Page 1
PERIODIC TEST
QUESTION PAPER
Question Paper for CBSE Board, KV Schools,
State Board following NCERT Syllabus
PT 1 | PT 2
Page 2
Question Paper based on NCERT Syllabus
CBSE Board Question Paper / KV Schools Question Paper
PT-2 EXAMINATION, Class XI – JAN 2024
COMPUTER SCIENCE (083)
Time : 1.5 hours Maximum Marks : 35
General Instructions:
Programming Language: Python
1 The ……… statement if used for selection or decision making: 1
i) while ii) for iii) if iv) def
2 Consider the statements I and II 1
I) The output of following code is 5
a=5
while a> 5:
a+=1
print( a )
II) If the condition of while loop is initially false, the body of while loop is not executed even
once.
a) I is true and II is false
b) I is false and II is true
c) Both I and II are true and II is the correct explanation of I
d) Both I and II are true and II is not the correct explanation of I
3 Strings in python are ………….. 1
a) mutable b) immutable c) decision constructs d) None of these
4 The output of following code: 1
list1=[1,2,3,4,5]
print(list1[len(list1)-1])
a) 3 b) 5 c) 2 d) 4
5 Lists are ………… sequences in Python 1
a) mutable b) immutable c) set d) ordinary
6 Add the elements of [ 3, 4, 5] at the last of [ 1, 2] , so that the result will be [ 1, 2, 3, 4, 5] 1
[1 , 2].________( [3, 4, 5])
Choose the correct function name , to accomplish the task
a) insert b) add c) append d) extend
7 Choose the correct output of following code: 1
tuple1= ( 5, )
print( tuple1 * 4)
a) (20 , ) b) 20 c) ( 5, 5, 5, 5) d) (5, 4)
8 From a dictionary, ………. Returns a list of key,value pairs 1
a) keys( ) b) values( ) c) items( ) d) none of these
9 What is the purpose of range( ) function ? Give one example. 1
10 Consider the following string mySubject 1
mySubject = ‘Computer Science’
What will be the output of following statement?
Print( mySubject[ -7 : -1 ] )
11 If in the Python code, the percentage marks of all candidates are stored / extracted into the 1
list variable named all_percent.
e.g. for 5 candidates
Page 3
all_percent = [ 84.2 , 60 , 81, 74, 63.2 ]
Then write the python code to show / print the highest percentage marks among applicants.
12 What will be the output of the following code segment: 2
myList = [1,2,3,4,5,6,7,8,9,10]
del myList[:3]
print(myList)
13 Why the following code is giving error ? 2
tuple1 = (2,4,6,8,10,12)
print( tuple1[6] )
14 Write the output of following code: 2
d = { ‘abc’: 65, ‘cde’: 67 , ‘xyz’:64 }
print ( len(d) )
15 Write the function name of the dictionary, which removes all items of the dictionary 2
16 Differentiate between break and continue statement using examples. 3
17 Differentitae between append and extend functions of list. 3
18 Consider the following dictionary: 3
stateCapital = { “AndhraPradesh” : “Hyderabad”, “WestBengal”:”Kolkata” ,
“Maharashtra”:”Mumbai” , “Tamilnadu”: “Chennai”}
Find the output of following statements:
i. print( stateCapital.get(“West Bengal”))
ii. del stateCapital [ “Tamilnadu” ]
print ( stateCapital )
19 Write the python program to show all prime numbers between 2 to 50 3
OR
Write the Python program to input the percentage, and show the grade as per following
criteria
percentage above 90 A
percentage between 50 to 90 B
percentage below 50 C
20 The record of a student (Name, Roll No, Marks in five subjects, percentage of marks) is 4
stored in the following list:
stRecord = [‘Raman’ , ‘A-36’, [56, 98, 99, 72, 69], 78.8]
Write Python statements to retrieve the following information from the list stRecord
a) Percentage of the student
b) Marks in the fifth subject
c) Maximum marks of the student
d) Roll no. of the student
e) Change the name of the student from ‘Raman’ to ‘Raghav’
OR
Write a python program to input your friends’ names and their Phone Numbers and store
them in the dictionary as the key-value pair. Perform the following operations on the
dictionary.
a) Display the name and phone number of all the friends.
b) Add a new key-value pair in this dictionary and show the modified dictionary.
AglaSem Earn while Learn Program. Send your papers and get paid.
Contact: support@
Page 4
QUESTION PAPERS
GET PREVIOUS YEAR QUESTION PAPERS FOR ALL CLASSES FOR CBSE, ISCSE, ISC AND ALL ALL
STATE BOARDS HERE AT
Andhra Pradesh Board Question Papers
BOARD
WISE Assam Board Question Papers
Bihar Board Question Papers
Chhattisgarh Board Question Papers
Goa Board Question Papers
Gujarat Board Question Papers
Haryana Board Question Papers
Himachal Pradesh Board Question Papers
J&K State Board Question Papers
Jharkhand Board Question Papers
Karnataka Board Question Papers
Kerala Board Question Papers
Madhya Pradesh Board Question Papers
Maharashtra State Board Question Papers
Manipur Board Question Papers
Meghalaya Board Question Papers
Mizoram Board Question Papers
Nagaland Board Question Papers
Orissa Board Question Papers
Punjab Board Question Papers
Rajasthan Board Question Papers
Tamil Nadu Board Question Papers
Telangana State Board Question Papers
Tripura Board Question Papers
Uttarakhand Board Question Papers
Uttar Pradesh (UP) Board Question Papers
West Bengal (WB) Board Question Papers