Professional Documents
Culture Documents
Mock Paper 1
Mock Paper 1
CLASS-XII
General Instructions:
(b) Write the command to view all the databases present in the system.
29 Write a function FIND() that takes a nested list L (containing integers only) as its 3
argument. The function returns another list named „MaxList‟ that stores the largest
element of each sub list L.
For example:
If L contains [[8,11,10,12],[5,14,6,7],[2,4,5,19],[3,12,5,12]]
The MaxList will have - [12,14,19,12]
30 A list contains following record of a „Computer‟:[MACAddress, Brand, Price, RAM] 3
Write separate user defined functions to perform given operations on the stack named
„System‟:
(i) Push_element() - To Push an object containing Brand and Price of computers
whoseRAM capacity is more than 4GB.
(ii) Pop_element() - To Pop the objects from the stack and display them. Also, display
“Stack Empty” when there are no elements in the stack.
[“Lenovo”, 75000]
[ “HP”,72000]
[”Apple”, 110000]
[“Lenovo”, 75000]
[ “HP”, 72000]
[”Apple”, 110000]
Stack Empty
OR
BCCI has created a dictionary containing top players and their runs as key value pairs of
cricket team. Write a program, with separate user defined functions to perform the
following operations:
● Push the keys (name of the players) of the dictionary into a stack, where the
For example:
If the sample content of the dictionary is as follows:
SCORE={"KAPIL":40, "SACHIN":55, "SAURAV":80, "RAHUL":35, "YUVRAJ":110}
The output from the program should be:
YUVRAJ SAURAV SACHIN
(i) Suggest an ideal layout for connecting these blocks/centers for wired connectivity. 1
(ii) Which device will you suggest to be placed/installed in each of these blocks/centers 1
to efficiently connect all the computers within these blocks/centers.
(iii) Suggest the placement of Server in the network with justification. 1
(iv) The university is planning to connect its admission office in Delhi, which is more 1
than 780 km from the university. Which type of network out of LAN, MAN, or WAN
will be formed? Justify your answer.
(v) Suggest the device/ software to be installed in Udaipur campus to take care of data 1
security.
32 (a) Write the output of the code given below: 2+3
def Change(p,q=30):
global s
s=p*q
q=p//q
print(p,'@',q)
return p
p=150
Sample Question Paper/CSC-XII/SET-I Page 10 of 14
s=100
r=Change(p,s)
print(p,'@',s)
(b) A table „Student‟ is created in the database „Performance‟. The fields of „Student‟
table are: [StuID, Name, Class, Total, Grade]. Thereafter, the table is to be interfaced
with Python IDLE to perform certain tasks. The incomplete code is given below:
Now, with reference to the above code, answer the following questions:
(i) What will you fill in Line 1 to complete the statement.
(ii) What will you fill in Line 3 to fetch all the records from the table?
(iii) What necessary change you will perform in Line 2 to display all such names from the
table „Student‟ who have secured Grade A?
OR
Write a Program in Python that defines and calls the following user defined functions:
ADD(): To add English mark of a student into the csv file named „English.csv‟
containing records like Class, Section and Marks of a student.
SECTION-E
34 Mr. Asmit is the class teacher of Class- XII-C. He created a table named „Student‟ to 1+1+2
store records like StuID, Name, Gender, Age and AvgMark of his section students.
(i) Identify the most appropriate column which can become a Primary Key. Justify your
answer.
(ii) Find the degree and cardinality of the above relation if 5 new students record is added
b. Add a column REMARKS in the table with datatype as varchar with 50 characters.
35 Robin, a software programmer is writing a program to create a CSV file which will
contain ItemID and ItemName for some entries. He has written the following code. As a
import csv
fin=open(“Item.csv”,__________) #Line 1
csvw=csv.writer(fin)
csvw.writerow([ItemID,ItemName])
fin.close()
def readcontents():
fout=open(“Item.csv”,”r”)
csvr=csv.__________(fout) #Line 2
print(rec[0],rec[1])
fout._____________() #Line 3
1
i) In which mode he should open the file in function AddItem() in Line 1.
1
ii) Which function is required to be used in Line 2 and Line 3.
2
iii) How to perform the following operation?
• to display the entire content of the CSV file by calling the function readcontents().