cs2_
cs2_
CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
Ans (c) print("15" + 3) Ans (a) Both (A) and (R) are true and (R) is the correct explanation for (A).
(1 Mark for the correct answer) (1 Mark for the correct answer)
11. Which of the following options is the correct unit of measurement for network bandwidth ? 1 (½ Mark for writing correct expansion of XML)
(a) KB (b) Bit (½ Mark for writing correct expansion of PPP)
(½ Mark for the loop to process individual students from the dictionary) (1 Mark for correctly converting to list)
(1 Mark for calculating grades) (1 Mark for correctly popping the last element/name)
(½ Mark for displaying grades)
24. (A) Ms. Veda created a table named Sports in a MySQL database, containing columns 2
OR Game_id, P_Age and G_name.
After creating the table, she realized that the attribute, Category has to be
(B) Write a user defined function in Python named Puzzle(W,N) which takes the added. Help her to write a command to add the Category column. Thereafter,
argument W as an English word and N as an integer and returns the string where write the command to insert the following record in the table :
every Nth alphabet of the word W is replaced with an underscore ("_").
Game_id : G42
For example : if W contains the word "TELEVISION" and N is 3, then the function P_Age : Above 18
should return the string "TE_EV_SI_N". Likewise for the word "TELEVISION" if G_name : Chess
N is 4, then the function should return "TEL_VIS_ON". Category : Senior
CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
27 Consider the table ORDERS given below and write the output of the SQL queries that 1x3 Ans def c_words():
=3 f=open("[Link]","r")
follow:
Txt=[Link]()
ORDNO ITEM QTY RATE ORDATE
CLower=CUpper=0
1001 RICE 23 120 2023-09-10 for i in Txt:
1002 PULSES 13 120 2023-10-18 if [Link]():
CLower+=1
1003 RICE 25 110 2023-11-17 elif [Link]():
1004 WHEAT 28 65 2023-12-25 CUpper+=1
print(CLower, CUpper)
1005 PULSES 16 110 2024-01-15 [Link]()
1006 WHEAT 27 55 2024-04-15 OR
def c_words():
1007 WHEAT 25 60 2024-04-30 with open("[Link]","r") as F:
Txt=[Link]()
(i) SELECT ITEM, SUM(QTY) FROM ORDERS GROUP BY ITEM; CL=CU=0
(ii) SELECT ITEM, QTY FROM ORDERS WHERE ORDATE BETWEEN for i in Txt:
'2023-11-01' AND '2023-12-31'; if [Link](): # if i>="a" and i<="z":
(iii) SELECT ORDNO, ORDATE FROM ORDERS WHERE ITEM = 'WHEAT' CL+=1
AND RATE>=60 ; elif [Link]():# if i>="A" and i<="Z":
CU+=1
Ans (i) print(CL, CU)
ITEM SUM(QTY) ( ½ Mark for correctly opening the file)
RICE 48 ( ½ Mark for reading the content of file using any correct method/mode)
PULSES 29 ( ½ Mark for the correct loop)
WHEAT 80 ( ½ Mark for correctly checking and incrementing for uppercase alphabets)
( ½ Mark for correctly checking and incrementing for lowercase alphabets)
(ii) ( ½ Mark for printing/returning required output)
ITEM QTY
29 Consider the table Projects given below: 1x3
RICE 25 =3
Table: Projects
WHEAT 28
P_id Pname Language Startdate Enddate
(iii) P001 School Management System Python 2023-01-12 2023-04-03
ORDNO ORDATE P002 Hotel Management System C++ 2022-12-01 2023-02-02
P003 Blood Bank Python 2023-02-11 2023-03-02
1004 2023-12-25
P004 Payroll Management System Python 2023-03-12 2023-06-02
1007 2024-04-30
Based on the given table, write SQL queries for the following:
(1 Mark for writing each correct output) (i) Add the constraint, primary key to column P_id in the existing table
Projects.
Note: (ii) To change the language to Python of the project whose id is P002.
● Ignore output heading (iii) To delete the table Projects from MySQL database along with its data.
● Ignore order of rows
28 (A) Write a user defined function in Python named showInLines() which reads contents 3 Ans (i) ALTER TABLE Projects
of a text file named [Link] and displays every sentence in a separate line. ADD PRIMARY KEY (P_id);
Assume that a sentence ends with a full stop (.), a question mark (?), or an
exclamation mark (!). (½ Mark for ALTER TABLE part)
(½ Mark for ADD PRIMARY KEY part)
CBSE AISSCE 2024 Marking Scheme for Computer Science CBSE AISSCE 2024 Marking Scheme for Computer Science
(Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4 (Series &RQPS Sub Code: 083 Q.P. Code 91) SET-4
(ii) Which block in Chennai division should host the server? Justify your answer. except:
break
Ans Vajra can host the server as it has a maximum number of computers. [Link]()
OR [Link]()
Any other answer with valid justification
OR
Any other correct variation of the code
(½ Mark for the correct answer)
(½ Mark for the correct justification)
(½ Mark for opening the file [Link] in correct mode)
(iii) Which fast and effective wired transmission medium should be used to connect (½ Mark for opening the file new_items.dat in correct mode)
the prime office at Bengaluru with the Chennai division? (½ Mark for reading the content of the file [Link])
(½ Mark for the correct loop)
Ans Optical Fiber (½ Mark for checking the condition)
(½ Mark for writing the required contents into the file new_items.dat)
(1 Mark for the correct answer)
Note: Ignore [Link]() and [Link]()
(iv) Which network device will be used to connect the digital devices within each
location of Chennai division so that they may communicate with each other ? OR
Ans Switch/Hub/Router (B) (i) What is the advantage of using with clause while opening a data file in Python ?
Also give syntax of with clause.
(1 Mark for the correct answer)
The advantage of using with clause is that any file that is opened using this clause is
(v) A considerable amount of data loss is noticed between the different locations of the closed automatically, once the control comes outside the with clause.
Chennai division, which are connected in the network. Suggest a networking device Example:
that should be installed to refresh the data and reduce the data loss during with open("[Link]","r+") as file_object:
transmission to and from different locations of Chennai division. content = file_object.read()
OR
Ans ( ½ Mark each for the any two correct feature as mentioned above or any
other correct feature)
(ii) Sumit wants to write a code in Python to display all the details of the passengers
from the table flight in MySQL database, Travel. The table contains the
following attributes:
F_ code : Flight code (String)
Page 25/26