CS Xii PB QP - Set1
CS Xii PB QP - Set1
(WINTER STATION)
SECOND PRE-BOARD EXAMINATION 2023-24
CLASS : XII MAX. MARKS : 70
SUBJECT : COMPUTER SCIENCE TIME : 3 hrs
General Instructions:
➢ Please check this question paper contains 35 questions.
➢ The paper is divided into 4 Sections- A, B, C, D and E.
➢ Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
➢ Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
➢ Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
➢ Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
➢ Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
➢ All programming questions are to be answered using Python Language only.
Q. No Question Marks
SECTION A
State True or False:
1 “ Identifiers are names used to identify a variable, function in a 1
program”.
2 In a table in MYSQL database, an attribute P of datatype varchar (25) 1
has the value “Ravimohan”. The attribute Q of datatype char (25) has
value “Himanshi”. How many characters are occupied by attribute P
and attribute Q?
a. 25,9 b. 9,25
c. 8,9 d. 9,8
3 What will be the output of the following statement: 1
print(3/2*2**3+99//11)
a. 21 b. 21.0
c. -21.0 d. Error
4 Select the correct output of the code: 1
Str=”Cumulative Test @ 12”
A=Str.partition(“ “)
a. (‘Cumulative’, ‘ ’, ‘Test @ 12 ’) b. (‘Cumulative’, ‘Test @ 12 ’)
c. (‘Cumulative’, ‘Test’, ‘@ 12 ’) d. (‘Cumulative’, ‘Test @ 12 ’)
5 In MYSQL database, if a table Company, has degree 7 and cardinality 1
4, and another table, Customer has degree 4 and cardinality 6, what
will be the degree and cardinality of the Cartesian product of
Company and Customer?
a. 11,24 b. 24,11
c. 7,4 d. 4,6
6 Divya wants to transfer a file from her mobile phone to her laptop. 1
She uses Bluetooth Technology to connect two devices. Which type of
network will be formed in this case?
a. PAN b. LAN
c. MAN d. WAN
7. Which of the following will add key-value pair for key = “Raju” and 1
value=75 to a dictionary D?
a. D[“75”]=”Raju”
b. D[“Raju”]=”75”
c. D[“Raju”]=75
d. D[“Raju”]=D[“75”]
8 Consider the statements given below and then choose the correct
output from the given options: 1
count="Twenty four"
print(count[-2:2:-2])
Options:
a. ufyn b. rote
c. wnyo d. Error
a. M_M_Y_P b. R_G_A_G
c. P_G_R_Y d. Y_P_G_A
15 1
___________ switching is more reliable than ______________
switching in computer network communication.
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
17 Assertion (A):-Built in functions are predefined in the language that are 1
used directly.
SECTION B
19 (i) Expand the following terms: 1+1=
MAC, TCP 2
(ii) The IP address 256.16.12.04 is valid (True/False)
OR
(i) Write one use of POP3.
(ii) Write one difference between Bus and Star topology.
20 Rewrite the following code in python after removing all syntax error(s). 2
Underline each correction done in the code.
M= int(input("Enter a number")
for K in range(0,11):
if M=K:
print(M+K)
else
Print(M-K)
21 2
Write definition of a method/function DoubletheOdd( ) to add and
display twice of odd values from the list of Nums.
For example :
If the Nums contains [25,24,35,20,32,41]
The function should display
Twice of Odd Sum: 202
OR
OR
OR
creating the table, she realized that the attribute, address has to be
deleted from the table and a new attribute Marks of data type
blank. Help Mahak write the commands to complete both the tasks.
25 Find and write the output of the following python code: 2
def Change(P ,Q=10):
P=P*Q
Q=Q+P
print( P,"#",Q)
return (Q)
A=5
B=10
A=Change(A)
B=Change(A,B)
print(A,"#",B)
SECTION C
26 What will be the output of the following python program? 3
str = ""
name = "9@Days"
for x in name:
if x in "aeiou":
str+=x.upper()
elif not x.isalnum():
str+="**"
elif x.isdigit():
pass
else:
str+=x.lower()
print(str)
27 Consider the table GAMES given below and write the output of the 3
SQL queries that follow.
PrizeMone
GCode GameName Number y ScheduleDate
101 CaromBoard 2 5000 23-Jan-2004
102 Badminton 2 12000 12-Dec-2003
103 TableTennis 4 8000 14-Feb-2004
105 Chess 2 9000 01-Jan-2004
108 LawnTennis 4 25000 19-Mar-2004
OR
Based on the given table, write SQL queries for the following:
(i) Display Ticket no and Passenger Name whose ticket price is
more than 6500.
(ii) Delete the records of Passengers whose destination Name ends
with L.
(iii) Update the value of Price of Ticket (increase price by rs 500)
whose quantity is more than 2.
● Push the keys (Employee code) of the dictionary into a stack, where
the corresponding value (Salary) is less than 25000.
● Pop and display the popped content of the stack. For example: If
the sample content of the dictionary is as follows:
31 4
Consider the following tables ACTIVITY and COACH and write SQL
commands.
TABLE : ACTIVITY
ACode ActivityName ParticipantsNum PrizeMoney ScheduleDate
1001 Relay 100×4 16 10000 23-jan-2004
1002 High Jump 10 12000 12-dec-2003
1003 Shot Put 12 8000 14-feb-2004
100 Long Jump 12 9000 01-jan-2004
1008 Discuss Throw 10 15000 19-mar-2004
TABLE : COACH
PCode Name ACode
1 Ahmad Hussain 1001
2 Ravinder 1008
3 Janila 1001
4 Naaz 1003
(i) To display the name of all activities with their Acode in descending
order.
(ii) To display sum of prize money for each of the Participants’ number
groups.
(iii) To display the coach’s name and ACode with name starting with J.
(iv) To display Name of activity, Prize money and Coach name for
which number of participants are greater than 10.
Development HR
Logistics Admin
Number of Computers.
Block Number of computers
Development 100
HR 120
Admin 200
Logistics 110
iii) Suggest the wired medium and draw the cable block to block
layout to economically connect the various blocks.
• Salary – integer
MySQL:
• Username - root
• Password - lion
• Host - localhost
The values of fields Empid, Ename, DOB and Salary has to be accepted
from the user. Help Kamal to write the program in Python.
OR
(i) Give one difference between foreign key and candidate key.
• name(Name) - string
• Fee – float
Note the following to establish connectivity between Python and
MySQL:
• Username - root
• Password - tiger
• Host - localhost
Balraj, now wants to display the records of students whose fee is more
than 5000. Help him to write the program in Python.
-------------