CLASS XII CS PRE BOARD QP
CLASS XII CS PRE BOARD QP
CLASS XII CS PRE BOARD QP
Roll Number
Candidates must write the Set No on
the title page of the answer book
CLASS – XII
SUB: COMPUTER SCIENCE (083)
Max. Marks:70 Time Allowed: 3 Hours
This question paper contains 37 questions.
● All questions are compulsory.
However, internal choices have been provided in some questions. Attempt only one of the choices in such
questions
● The paper is divided into 5 Sections- A, B, C, D and E.
● Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
● Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
● Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
● Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
● Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
● All programming questions are to be answered using Python Language only.
● In case of MCQ, text of the correct answer should also be written.
If res%4==0:
print(res*4)
elseif
res%5==0:
print(res+3)
Else:
print(res+10)
25. Write the Python statement for each of the following tasks using BUILT-IN functions/methods only: [2]
(a) Sort the elements of a tuple Tup in ascending order.
(b) Remove an element present at index 3 of a List Li.
OR
(a) Convert the input to the type of element as entered.
(b) Find the total of values in a list of integers.
26. Write the output of the following code snippet. [2]
V=70
def display(N):
global V
V=35
if N%9==0:
V=V*N
else:
V=V/N
print(V, end="*")
display(15)
print(int(V))
27. Arjun has created a table SMS containing SRoll_no, Sname, SClass, SPhone_no and percent. Later, he
realizes that the field Sphone_no may have duplicate values. Help him to write a SQL command to set
the property of this field to deny duplicate values. Also he needs help to write SQL command to see the
structural detail of the table SMS. [2]
OR
Ms. Trisha of a software company created a table Clients under a database Company. After creating
table, she now wants to add an additional column C Portfolio to store textual information containing
maximum of 100 characters and that can’t be blank. Also she wants to view all the tables present under
the database Company. Help her to write the SQL commands to complete the above tasks.
31. 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 whose RAM
capacity is more than 8 GB.
(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.
For example:
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 corresponding value
(runs) is greater than 49.
● Pop and display the content of the stack. For example:
SECTION-D
32. (a) Refer the tables given below: [4]
Table : Book
Code Sub
B1 English
B2 Physics
B3 History
B4 Science
Table : Stock
SCode Pub Qty Code
P01 Gyan Chand 250 B1
P02 Pustak House 340 B2
P03 Arora 470 B3
P04 Sonka 245 B5
Predict the output for the following query:
SELECT * FROM Book NATURAL JOIN Stock;
Table : PAYLEVEL
PLEVEL PAY ALLOWANCE
P001 26000 12000
P002 22000 10000
P003 12000 600
SECTION-E
36. Quickdev, an IT based firm, located in Delhi is planning to set up a network for its four branches
within a city with its Marketing department in Kanpur.
As a network professional, give solutions to the questions (i) to (v), after going through the branches
locations and other details which are given below: [1x5=5]
******