QP Csxii pb1 Set2
QP Csxii pb1 Set2
आगरा संभाग
प्रथम प्री बोर्ड परीक्षा-2024-25
KENDRIYA VIDYALAYA SANGATHAN
AGRA REGION
First Pre Board Examination-2024-25
Page 1 of 12
print(x)
(a) #John#Peter#Vicky
(b) John#Peter#Vicky
(c) John#Peter#Vicky#
(d)#John#Peter#Vicky#
3 Which of the following expressions evaluates to TRUE. 1
(a) not(True) or not (False))
(b) print(True and False)
(c) print(not(False and True))
(d) print(not (True) and False)
4 1
Select the correct output of the code:
s = "Question paper 2024-25"
s= s.split('2')
print(s)
(a) ['Question paper ', '0', '4', '-', '5']
(b) ('Question paper ', '0', '', '-', '')
(c) ['Question paper ', '0', '4-', '5']
(d) ('Question paper ', '0', '4', '', '-', '5')
5 What will be the output of the following code snippet? 1
message= "Tea City"
print(message[-1::-1])
6 What will be the output of the following code? 1
tuple1 = (1, 2, 4, 3)
tuple2 = (1, 2, 3, 4)
print(tuple1 < tuple2)
(A) True
(B) False
(C)tuple1
(D)Error
7 If one_dict is a dictionary as defined below, then which of the following 1
statements will raise an exception
one_dict = {'shoes': 1000, 'bag': 1200, 'specs': 500}
Page 2 of 12
(a) one_dict.get('specs')
(b) print(one_dict['shooes'])
(c ) k=one_dict.keys()
(d ) print(str(one_dict))
8 What does the list.pop(a) method do in Python? 1
(A) Deletes the element at index a from the list
(B) Deletes the first occurrence of value a from the list
(C) Deletes all occurrences of value a from the list
(D) Deletes the last occurrence of value a from the list
9 If a table which has one primary key and two unique constraints. How 1
many Primary keys will this table have?
(A) 1 (B) 2 (C) 3 (D) 4
10 Consider the Python statement: 1
f.seek(10, 1)
Choose the correct statement from the following:
(a) file pointer will move 10 byte in forward direction from beginning of
the file
(b) file pointer will move 10 byte in forward direction from end of the file
(c) file pointer will move 10 byte in forward direction from current location
(d) file pointer will move 10 byte in backward direction from current
location
11 In a try...expect block, there is a certain block that if specified, will be 1
executed regardless if the try block raises an error or not. What is the
name of this block? (a) finally (b) last (c) always
12 What will be the output of the following code? 1
value = 10
def show(n):
global value
value=25
if value%2==0:
value = value + n
else:
Page 3 of 12
value = value - n
print(value,end='#')
show(20)
print(value,end='%')
(A) 12%15#
(B) 10#5%
(C) 12#15%
(D) 12%15#
13 Which SQL command can change the data type of already present 1
attribute of an existing relation?
14 What will be the output of the query? 1
SELECT AVG(SALARY) FROM EMPLOYEE WHERE CITY LIKE ‘%R’;
(A) Average of salary for cities whose names start with 'R'
(B) Average of salary for cities whose names end with 'R'
(C) Salary for cities whose names end with 'R'
(D) Salary for cities whose names starts with ‘R’
15 To store the grade of students, which of the following data type will be 1
used?
(a) Char (b)Int (c )Date (d) float
16 The following command 1
Select count(*) from employee;
Will show (a) degree (b) cardinality (c) domain
17 Suggest a protocol that is used to transmit E-mail over internet.
(A) HTTP (B) FTP (C) VoIP (D)SMTP
18 Which network device is used to connect two networks that use same 1
protocols?
(A) Modem (B) Gateway (C)Switch (D)Bridge
19 Which switching technique follows the store and forward mechanism? 1
(a) Circuit switching (b) message switching
(c) packet switching (d) All of these
Q20 and Q21 are Assertion(A) and Reason(R) based questions. Mark the
correct choice as:
Page 4 of 12
(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
20 Assertion (A): A variable declared as global inside a function is visible 1
with changes made to it outside the function.
Reasoning (R): All variables declared outside are not visible inside a
function till they are redeclared with global keyword
21 Assertion (A): Aggregate functions operate on groups of rows and return 1
a single result for each group.
Reasoning (R): It can be used with WHERE and HAVING clauses only.
Ques. PART B Marks
No.
22 How is a mutable object different from an immutable object in Python? 2
Identify one mutable object and one immutable object from the following:
{21:12,12:21}, (21,12), [12,21], ‘1231’
23 Give two examples of each of the following: 2
(I) Logical operators (II) Relational operator
24 Given is a Python List declaration: 2
lst1= [39, 45, 23, 15, 25, 60]
(Answer using built in functions only)
(a) Insert value 90 at index 3
(b) Display elements of list in reverse
OR
(a) Add another list [2,3,4] at end of lst1
(b) Find sum of elements of list
25 What possible output(s) are expected to be displayed on screen at the 2
time of execution of the program from the following code? Find
maximum and minimum value of begin.
import random
points=[30,50,20,40,45]
begin=random.randint(1,3)
Page 5 of 12
last=random.randint(2,4)
for c in range(begin,last+1):
print(points[c],"#")
(a) 20#50#30# (b) 20#40#45
(c) 50#20#40# (d) both (b) and (c)
26 There are syntax and logical errors in the code. Rewrite it after removing 2
all errors. Underline all the corrections made.
def find_sum(tup1,tup2)
newtup=tup1+tup2
return newtup
Page 7 of 12
str1=""
for i in d:
str1=str1+str(d[i])+"@"
str2=str1[:–1]
print (str2)
OR
L=[1,2,3,4,5]
Lst=[]
for i in range(len(L)):
if i%2==1:
t=(L[i],L[i]**2)
Lst.append(t)
print(Lst)
Ques. PART D Marks
No.
32 Consider the table CHIPS as given below: 4
TABLE: CHIPS
LAYS ONION 10 5
BIKANO TOMATO 20 12
UNCLE CHIPS SPICY 12 10
KALEVA PUDINA 10 12
HALDIRAM SALTY 10 20
HALDIRAM TOMATO 25 30
Page 8 of 12
OR
Page 9 of 12
(i) SELECT Department, max(salary) FROM Teacher
GROUP BY Department;
(ii) SELECT MAX(Date_of_Join),MIN(Date_of_Join) FROM
Teacher;
(iii) SELECT Name, Salary, T.Department, Place FROM
Teacher T, Placement P WHERE T.Department =
P.Department AND P.Department='History';
(iv) SELECT Name, Place FROM Teacher natural join
Placement where Gender='F';
OR
To display the Cartesian Product of these two tables
35 4
(b) Write a function adds a new column in the table Student, updates
the data into it and displays the content of the table.
Student table details are as follows:
Rollno – integer
Name – string
Marks – integer
Page 11 of 12
Number of computers:
Block Number of Computers
IT 75
DS 50
IoT 80
Page 12 of 12