Python 3 - Mock Test I
作者:互联网
Python 3 - Mock Test I
Q 1 - Which of the following is correct about Python?
A - Python is a high-level, interpreted, interactive and object-oriented scripting language.
B - Python is designed to be highly readable.
Q 2 - Which of the following is correct about Python?
A - It supports functional and structured programming methods as well as OOP.
C - It provides very high-level dynamic data types and supports dynamic type checking.
Q 3 - Which of the following is correct about Python?
A - It supports automatic garbage collection.
B - It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
Q 4 - Which of the following environment variable for Python tells the Python interpreter where to locate the module files imported into a program?
Q 5 - Which of the following environment variable for Python contains the path of an initialization file containing Python source code?
Q 6 - Which of the following environment variable for Python is used in Windows to instruct Python to find the first case-insensitive match in an import statement?
Q 7 - Which of the following environment variable for Python is an alternative module search path?
Q 8 - Is python a case sensitive language?
Q 9 - Which of the following data types is not supported in python?
Q 10 - Which of the following data types is not supported in python?
Q 11 - What is the output of print str if str = 'Hello World!'?
Q 12 - What is the output of print str[0] if str = 'Hello World!'?
Q 13 - What is the output of print str[2:5] if str = 'Hello World!'?
Q 14 - What is the output of print str[2:] if str = 'Hello World!'?
Q 15 - What is the output of print str * 2 if str = 'Hello World!'?
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 ]
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 ]
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 ]
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 ]
Q 20 - What is the output of print tinylist * 2 if tinylist = [123, 'john']?
A - [123, 'john', 123, 'john']
Q 21 - What is the output of print tinylist * 2 if tinylist = [123, 'john']?
A - [123, 'john', 123, 'john']
Q 22 - Which of the following is correct about tuples in python?
A - A tuple is another sequence data type that is similar to the list.
B - A tuple consists of a number of values separated by commas.
C - Unlike lists, however, tuples are enclosed within parentheses.
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 )
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 )
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 )
Question Number | Answer Key |
---|---|
1 | D |
2 | D |
3 | C |
4 | A |
5 | B |
6 | C |
7 | D |
8 | A |
9 | D |
10 | C |
11 | A |
12 | B |
13 | C |
14 | A |
15 | A |
16 | A |
17 | B |
18 | C |
19 | D |
20 | A |
21 | A |
22 | D |
23 | A |
24 | B |
25 | C |
REF
https://www.tutorialspoint.com/python3/python_mock_test.htm?min=1&max=25
标签:abcd,786,70.2,Python,above,Test,2.23,john,Mock 来源: https://www.cnblogs.com/emanlee/p/16088652.html