Zed-King Study app · Free
O Level students across India practise here, free
Google login · no Play Store needed
About this PDF
Model test paper 2 for O Level M3-R5.1 — the second full set, leaning on variables, operators and Python statements. Attempt it after finishing chapters 1 to 4.
This is part of the free O Level M3-R5.1 study material in the Zed-King Study Zone. You can read every page above in your browser, or download the file and study offline. Zed-King Group of Institute is a NIELIT Study Centre in Kaithal, Haryana, and all of this material follows the current NIELIT syllabus.
- Course
- O Level — NIELIT Foundation Diploma
- Module
- M3 — M3-R5.1: Programming and Problem Solving through Python
- Section
- Model Test Papers
- Format
- PDF — read online or download
- Price
- Free, no sign-up required
Text from this PDF
The opening pages as plain text — open the reader above for tables, diagrams and the full file.
1 .Who is inventor of Python ? · A) Larry Wall B) Mark Jukervich · C) Guido van Rossum D) Dennis Ritchi
2 .Python initial release date ?
3 .Which of the following statements is true? · A) Python is a high level programming language. · B) Python is an interpreted language. · C) Python is an object-oriented language. · D) All of the above.
4 .What symbol can you use to comment out one line of code? · C) // D) (comment)
5 .What is the difference between a class and an object in Python? · A) There is no difference between a class and an object · B) Classes are made from iterations while objects are not. · C) Objects are created from classes. · D) Objects are not able to be called.
6 .Which of the following is not a class method? · A) Non-static B) Static · C) Bounded D)Unbounded
7 .In python which keyword is used to start function ?
Model Test Paper 2
A) Function B) def
C) try D) import
8 .Which of the following environment variable for Python is an alternative module search path? · A) PYTHONPATH B) PYTHONSTARTUP · C) PYTHONCASEOK D) PYTHONHOME
9 .Which of the following functions print the output to the console? · A) echo B) output · C) print D) console.log
10 .Which module in Python supports regular expressions? · A) re B) regex · C) pyregex D) None of the above
11 .Which of the following keyword is a valid placeholder for body of the function ? · A) break B) continue · C) body D) pass
12 .Which of the following is correct? · A) Variable name can start with an underscore. · B) Variable name can start with a digit. · C) Keywords cannot be used as a variable name. · D) Variable name can have symbols like: @, #, $ etc.
13 .Which of the following statements is NOT true about Python? · A) Python can be used for web development · B) Python’s syntax is much like PHP · C) Python can run on any type of platform · D) Python can be used to generate dynamic web pages
14 .What is the return value of trunc() ? · A) int B) bool · C) float D) None of the above
15 .What is the need of :
if __name__ == "__main__":
somemethod()
A) Create new module B) Define generator
c) Run python module as main program D) Create new objects
16 .Which operator is used to compare two numbers for equality?
17 .In python which is the correct method to load a module ? · A) include math B) import math · C) #include<math.h> D) using math
18 .Which function is used to open the file for reading in python ? · A) fopen(filename, mode) B) open_file(filename, mode) · C) openfile(filename, mode) D) open(filename, mode)
19 .Which of the following function checks in a string that all characters are numeric? · A) isnumeric() B) islower() · C) isspace() D) istitle()
20 .In python 3 what does // operator do ? · A) Float division B) Integer division · C) returns remainder D) same as a**b
21 .What is used to take input from the user in Python? · A) cin B) scanf() · C) input() D) <>
22 .What is the name of data type for character in python ? · A) chr B) char · C) character D) python do not have any data type for characters they are treated as string.
23 .What error occurs when you execute?
apple = mango
24 .what should the below code print?
print type(1J)
A) <type 'complex'> B)<type 'unicode'>
C)<type 'float'> D)<type 'dict'>
25 .What is the output of the following code?
import re sentence = 'Learn Python Programming' test = re.match(r'(.*) (.*?) (.*)', sentence)
print(test.group())
A) Learn Python Programming B) (Learn, Python, Programming)
C) (‘Learn’, ‘Programming’) D) ‘Learn Python Programming’
26 .What is the output of L[2] if L = [1,2,3]? · C) 4 D) None of the above.
More model test papers for M3-R5.1
Run these Python programs yourself — free
Reading code is not the same as writing it. Type any program from these notes into our free online Python compiler (real Python 3 with NumPy, input() works), or study one of the explained programs with its output.
Prepare for O Level with expert guidance
Classroom training, practical labs and exam registration at Zed-King Institute, Kaithal.
