Page 31 - PYTHON-12
P. 31
APPENDIX E
PRACTICE PAPER 1
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)
print() method without any argument shall display a blank line.
2. Identify the output of the following code snippet: (1)
string = " Learn Python Programming "
result = string.strip().upper().replace(" ", "_")
print(result)
(a) LEARN PYTHON PROGRAMMING (b) Learn_Python_Programming
(c) Learn_python_programming (d) LEARN_PYTHON_PROGRAMMING
3. Which of the following expressions evaluates to True? (1)
(a) 5 * 2 == 10 and not (7 <= 5 or 3 == 4) (b) 8 > 10 or (4 == 4 and 6 > 8)
(c) 12! = 12 or (3 * 2 < 5 and 4 == 4) (d) 15 < 10 and (2 < 3 or 8 == 8)
4. What will be the output of the given expression? (1)
text = "Hello World"
print(text.lower().replace("o", "0"))
(a) hello w0rld (b) Hello W0rld
(c) hell0 w0rld (d) Hello World
5. What will be the output of the following code snippet? (1)
text = "AdvancedProgramming"
result = text[-12:-5][::-1]
print(result)
(a) dProgra (b) mmargorPdecn
(c) argorPd (d) ncedProgramm
6. What will be the output of the following code? (1)
data = {'A': (5, 8), 'B': (3, 6), 'C': (7, 2)}
result = data['A'][1] + data['B'][0] - data['C'][1]
print(result)
(a) 9 (b) 8
(c) 10 (d) 7