SAMPLE QUESTION PAPER (THEORY)
CLASS: XII SESSION: 2024-25
COMPUTER SCIENCE (083)
Time allowed: 3 Hours Maximum Marks: 70
General Instructions:
● 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.
Q No. Section-A (21 x 1 = 21 Marks) Marks
1. State True or False:
(1)
The Python interpreter handles logical errors during code execution.
2. Identify the output of the following code snippet:
text = "PYTHONPROGRAM"
text=text.replace('PY','#')
print(text)
(1)
(A) #THONPROGRAM
(B) ##THON#ROGRAM
(C) #THON#ROGRAM
(D) #YTHON#ROGRAM
3. Which of the following expressions evaluates to False?
(A) not(True) and False
(B) True or False (1)
(C) not(False and True)
(D) True and not(False)
4. What is the output of the expression?
country='International'
print(country.split("n"))
(A) ('I', 'ter', 'atio', 'al') (1)
(B) ['I', 'ter', 'atio', 'al']
(C) ['I', 'n', 'ter', 'n', 'atio', 'n', 'al']
(D) Error
Page: 1/11
, 5. What will be the output of the following code snippet?
message= "World Peace" (1)
print(message[-2::-2])
6. What will be the output of the following code?
tuple1 = (1, 2, 3)
tuple2 = tuple1
tuple1 += (4,)
print(tuple1 == tuple2) (1)
(A) True
(B) False
(C) tuple1
(D) Error
7. If my_dict is a dictionary as defined below, then which of the following
statements will raise an exception?
my_dict = {'apple': 10, 'banana': 20, 'orange': 30}
(A) my_dict.get('orange') (1)
(B) print(my_dict['apple', 'banana'])
(C) my_dict['apple']=20
(D) print(str(my_dict))
8. What does the list.remove(x) method do in Python?
(A) Removes the element at index x from the list
(B) Removes the first occurrence of value x from the list (1)
(C) Removes all occurrences of value x from the list
(D) Removes the last occurrence of value x from the list
9. If a table which has one Primary key and two alternate keys. How many
Candidate keys will this table have?
(A) 1
(1)
(B) 2
(C) 3
(D) 4
10. Write the missing statement to complete the following code:
file = open("example.txt", "r")
data = file.read(100)
____________________ #Move the file pointer to the (1)
beginning of the file
next_data = file.read(50)
file.close()
11. State whether the following statement is True or False:
The finally block in Python is executed only if no exception occurs
(1)
in the try block.
Page: 2/11
CLASS: XII SESSION: 2024-25
COMPUTER SCIENCE (083)
Time allowed: 3 Hours Maximum Marks: 70
General Instructions:
● 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.
Q No. Section-A (21 x 1 = 21 Marks) Marks
1. State True or False:
(1)
The Python interpreter handles logical errors during code execution.
2. Identify the output of the following code snippet:
text = "PYTHONPROGRAM"
text=text.replace('PY','#')
print(text)
(1)
(A) #THONPROGRAM
(B) ##THON#ROGRAM
(C) #THON#ROGRAM
(D) #YTHON#ROGRAM
3. Which of the following expressions evaluates to False?
(A) not(True) and False
(B) True or False (1)
(C) not(False and True)
(D) True and not(False)
4. What is the output of the expression?
country='International'
print(country.split("n"))
(A) ('I', 'ter', 'atio', 'al') (1)
(B) ['I', 'ter', 'atio', 'al']
(C) ['I', 'n', 'ter', 'n', 'atio', 'n', 'al']
(D) Error
Page: 1/11
, 5. What will be the output of the following code snippet?
message= "World Peace" (1)
print(message[-2::-2])
6. What will be the output of the following code?
tuple1 = (1, 2, 3)
tuple2 = tuple1
tuple1 += (4,)
print(tuple1 == tuple2) (1)
(A) True
(B) False
(C) tuple1
(D) Error
7. If my_dict is a dictionary as defined below, then which of the following
statements will raise an exception?
my_dict = {'apple': 10, 'banana': 20, 'orange': 30}
(A) my_dict.get('orange') (1)
(B) print(my_dict['apple', 'banana'])
(C) my_dict['apple']=20
(D) print(str(my_dict))
8. What does the list.remove(x) method do in Python?
(A) Removes the element at index x from the list
(B) Removes the first occurrence of value x from the list (1)
(C) Removes all occurrences of value x from the list
(D) Removes the last occurrence of value x from the list
9. If a table which has one Primary key and two alternate keys. How many
Candidate keys will this table have?
(A) 1
(1)
(B) 2
(C) 3
(D) 4
10. Write the missing statement to complete the following code:
file = open("example.txt", "r")
data = file.read(100)
____________________ #Move the file pointer to the (1)
beginning of the file
next_data = file.read(50)
file.close()
11. State whether the following statement is True or False:
The finally block in Python is executed only if no exception occurs
(1)
in the try block.
Page: 2/11