第一章 单元测试

1、 问题:Which is NOT the main part of computer ( )
选项:
A:CPU
B:memory
C:I/O equipment
D:Cache
答案: 【
Cache

2、 问题:Which symbol can be used for comments in Python ( )
选项:
A:#
B:!
C:“
D://
答案: 【


3、 问题:The integrated development tool built into Python is ( ).
选项:
A:IDLE
B:Jupyter
C:Pycharm
D:Vs code
答案: 【
IDLE

4、 问题:Which is the correct operator for power(Xy)? ( )
选项:
A:X^y
B:Xy
C:X^^y
D:None of the mentioned
答案: 【
X
y

5、 问题:Which of the following is incorrect? ( )
选项:
A:float(3)
B:float("3")
C:float(4.2)
D:float("3+5")
答案: 【
float("3+5")

第二章 单元测试

1、 问题:Which of the following is an invalid variable? ( )
选项:
A:my_string_1
B:1st_string
C:foo
D:_
答案: 【
1st_string

2、 问题:What will be the output of the following Python code ?
not(10<20) and not(10>30) ( )
选项:
A:True
B:False
C:Error
D:No output
答案: 【
False

3、 问题:Which one will return error when accessing the list ‘l’ with 10 elements. ( )
选项:
A:l[0]
B:l[-1]
C:l[10]
D:l[-10]
答案: 【
l[10]

4、 问题:What will be the output of the following Python code?
lst=[3,4,6,1,2]
lst[1:2]=[7,8]
print(lst) ( )
选项:
A:[3, 7, 8, 6, 1, 2]
B:Syntax error
C:[3,[7,8],6,1,2]
D:[3,4,6,7,8]
答案: 【
[3, 7, 8, 6, 1, 2]

5、 问题:Which of the following operations will rightly modify the value of the element? ( )
选项:
A:
s=’hello’
s[0]=’H’
B:
t=(‘h’,’e’,’l’,’l’,’o’)
t[0]=’H’
C:
t={‘h’,’e’,’l’,’l’,’o’}
t[0]=’H’
D:
t=[‘h’,’e’,’l’,’l’,’o’]
t[0]=’H’
答案: 【

t=[‘h’,’e’,’l’,’l’,’o’]
t[0]=’H’

6、 问题:

The following program input data: 95, the output result is?  (    )

选项:
A:
Please enter your score: 95
Awesome!
B:
Please enter your score: 95
Your ability exceeds 85% of people!
C:
Please enter your score: 95
Awesome!
Your ability exceeds 85% of people!
D:none of the mentioned
答案: 【

Please enter your score: 95
Awesome!
Your ability exceeds 85% of people!

第三章 单元测试

1、 问题:Which one description of condition in the followings is correct? ( )
选项:
A:The condition 35<=45<75 is legal, and the output is False
B:The condition 24<=28<25 is legal, and the output is True
C:The condition 24<=28<25 is legal, and the output is False
D:The condition 24<=28<25 is illegal
答案: 【
The condition 24<=28<25 is legal, and the output is False

本门课程剩余章节答案为付费内容
本文章不含期末不含主观题!!
本文章不含期末不含主观题!!
支付后可长期查看
有疑问请添加客服QQ 2356025045反馈
如遇卡顿看不了请换个浏览器即可打开
请看清楚了再购买哦,电子资源购买后不支持退款哦

   

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注