Python Mock Test I
Python Mock Test I
Python Mock Test I
Copyright tutorialspoint.com
http://www.tutorialspoint.com
This section presents you various set of Mock Tests related to Python. You can download these
sample mock tests at your local machine and solve offline at your convenience. Every mock test is
supplied with a mock test key to let you verify the final score and grade yourself.
Q 4 - Which of the following environment variable for Python tells the Python
interpreter where to locate the module files imported into a program?
A - PYTHONPATH
B - PYTHONSTARTUP
C - PYTHONCASEOK
D - PYTHONHOME
Q 5 - Which of the following environment variable for Python contains the path of an
initialization file containing Python source code?
A - PYTHONPATH
B - PYTHONSTARTUP
C - PYTHONCASEOK
D - PYTHONHOME
Q 16 - What is the output of print list if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
A - [ 'abcd', 786 , 2.23, 'john', 70.2 ]
B - list
C - Error
D - None of the above.
Q 17 - What is the output of print list[0] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
A - [ 'abcd', 786 , 2.23, 'john', 70.2 ]
B - abcd
C - Error
D - None of the above.
Q 18 - What is the output of print list[1:3] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
A - [ 'abcd', 786 , 2.23, 'john', 70.2 ]
B - abcd
C - [786, 2.23]
D - None of the above.
Q 19 - What is the output of print list[2:] if list = [ 'abcd', 786 , 2.23, 'john', 70.2 ]?
A - [ 'abcd', 786 , 2.23, 'john', 70.2 ]
B - abcd
C - [786, 2.23]
D - [2.23, 'john', 70.2]
C - Error
D - None of the above.
Q 23 - What is the output of print list if tuple = abcd , 786, 2.23, john , 70.2?
A - abcd , 786, 2.23, john , 70.2
B - tuple
C - Error
D - None of the above.
Q 24 - What is the output of print tuple[0] if tuple = abcd , 786, 2.23, john , 70.2?
A - abcd , 786, 2.23, john , 70.2
B - abcd
C - Error
D - None of the above.
Q 25 - What is the output of print tuple[1:3] if tuple = abcd , 786, 2.23, john , 70.2?
A - abcd , 786, 2.23, john , 70.2
B - abcd
C - 786, 2.23
D - None of the above.
ANSWER SHEET
Question Number
Answer Key
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Loading [MathJax]/jax/output/HTML-CSS/jax.js