Python 3 - Mock Test I
2022/4/1 22:19:33
本文主要是介绍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.
C - It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages.
D - All of the above.
Q 2 - Which of the following is correct about Python?
A - It supports functional and structured programming methods as well as OOP.
B - It can be used as a scripting language or can be compiled to byte-code for building large applications.
C - It provides very high-level dynamic data types and supports dynamic type checking.
D - All of the above.
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.
C - Both of the above.
D - None of the above.
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 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?
A - PYTHONPATH
B - PYTHONSTARTUP
C - PYTHONCASEOK
D - PYTHONHOME
Q 7 - Which of the following environment variable for Python is an alternative module search path?
A - PYTHONPATH
B - PYTHONSTARTUP
C - PYTHONCASEOK
D - PYTHONHOME
Q 8 - Is python a case sensitive language?
A - true
B - false
Q 9 - Which of the following data types is not supported in python?
A - Numbers
B - String
C - List
D - Slice
Q 10 - Which of the following data types is not supported in python?
A - Tuple
B - Dictionary
C - Generics
D - List
Q 11 - What is the output of print str if str = 'Hello World!'?
A - Hello World!
B - Error
C - str
D - None of the above.
Q 12 - What is the output of print str[0] if str = 'Hello World!'?
A - Hello World!
B - H
C - ello World!
D - None of the above.
Q 13 - What is the output of print str[2:5] if str = 'Hello World!'?
A - llo World!
B - H
C - llo
D - None of the above.
Q 14 - What is the output of print str[2:] if str = 'Hello World!'?
A - llo World!
B - H
C - llo
D - None of the above.
Q 15 - What is the output of print str * 2 if str = 'Hello World!'?
A - Hello World!Hello World!
B - Hello World! * 2
C - Hello World!
D - None of the above.
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]
Q 20 - What is the output of print tinylist * 2 if tinylist = [123, 'john']?
A - [123, 'john', 123, 'john']
B - [123, 'john'] * 2
C - Error
D - None of the above.
Q 21 - What is the output of print tinylist * 2 if tinylist = [123, 'john']?
A - [123, 'john', 123, 'john']
B - [123, 'john'] * 2
C - Error
D - None of the above.
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.
D - All 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.
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
这篇关于Python 3 - Mock Test I的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-04Python编程基础:变量与类型
- 2024-11-04Python编程基础
- 2024-11-04Python编程基础入门指南
- 2024-11-02Python编程基础
- 2024-11-01Python 基础教程
- 2024-11-01用Python探索可解与不可解方程的问题
- 2024-11-01Python编程入门指南
- 2024-11-01Python编程基础知识
- 2024-11-01Python编程基础
- 2024-10-31Python基础入门:理解变量与数据类型