第二章测试
1.Which of the following is an invalid variable? ( )
A:1st_string
B:my_string_1
C:_
D:foo

答案:A
2.What will be the output of the following Python code ?
not(10<20) and not(10>30) ( )
A:Error
B:True
C:False
D:No output
3.Which one will return error when accessing the list ‘l’ with 10 elements. ( )
A:l[0]
B:l[-10]
C:l[10]
D:l[-1]
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:Syntax error
B:[3,4,6,7,8]
C:[3, 7, 8, 6, 1, 2]
D:[3,[7,8],6,1,2]
5.Which of the following operations will rightly modify the value of the element? ( )
6.

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


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

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(106) dxwkbang
返回
顶部