Page 4 - PYTHON-12
P. 4
APPENDIX D
MODEL TEST PAPER 1 (SOLVED)
CLASS XII
COMPUTER SCIENCE (083)
Time Allowed: 3 hrs 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.
Section A
1. State whether the following statement is True or False: (1)
The arguments of range() function in Python must be integers.
Ans. True
2. Identify the output of the following code snippet: (1)
text = "Hello World from Python"
modified_text = text.title().strip().replace("o", "@").replace(" ", "-")
print(modified_text)
(a) Hell@-W@rld-fr@m-Pyth@n (b) Hell@-W@rld-from-Pyth@n
(c) Hello-World-from-Python (d) Hell@-World-from-Python
Ans. (a) Hell@-W@rld-fr@m-Pyth@n
3. Which of the following expressions evaluates to True? (1)
(a) True and not (False or True) (b) False or (True and False)
(c) True or (False and True) (d) False and (True or False)
Ans. (c) True or (False and True)
4. What will be the output of the given expression? (1)
text = "Hello, welcome to the world of Python!"
print(text.find("world"))
(a) 13 (b) 18
(c) 22 (d) –1
Ans. (c) 22
5. What will be the output of the following code snippet? (1)
course = "AdvancedMachineLearning"
result = course[0:9] + course[10:18]
print(result)
(a) AdvancedMchineLea (b) AdvancedMachineLea
(c) AdvancedMacchineLea (d) AdvancedMachineLearn
Ans. (a) AdvancedMchineLea