PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试

麓棘喜窖绥衰统惟婆婆师萍识

第一章 单元测试

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?
s_score=input(“Please enter your score:”)
score=int(s_score)
if score>=90:
print(“Awesome!”)
print(“Your ability exceeds 85% of people!”) ( )

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

2、 The output of the following program is?
t = “Python”
if t>=”python”:
t = “python”
else:
t = “None”
print(t) ( )

A:t
B:Python
C:None
D:python
答案: None

3、 for var in ___:
print(var)
Which option does not meet the grammatical requirements in the blank space of the above program? ( )

A:”Hello”
B:13.5
C:[1,2,3]
D:range(0,10)
答案: 13.5

4、 After the following program is executed, the value of s is?
s = 0
for i in range(1,20,3):
if i%5==0:
continue
elif i>8:
break
else:
s = s -1
s = s + i
else:
s = s + 10 ( )

A:9
B:19
C:46
D:47
答案: 9

5、

Which is the output of the following code?a = 30
b = 1
if a >=10:
a = 20
elif a>=20:
a = 30
elif a>=30:
b = a
else:
b = 0
print(“a=”,a,”b=”,b) ( )

A:a=30, b=30
B:a=30, b=1
C:a=20, b=20
D:a=20, b=1
答案: a=20, b=1



上方为免费预览版答案,如需购买完整答案,请点击下方红字

点击这里,购买完整版答案


 

点关注,不迷路,微信扫一扫下方二维码

关注我们的公众号:阿布查查  随时查看答案,网课轻松过

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试第1张


为了方便下次阅读,建议在浏览器添加书签收藏本网页

电脑浏览器添加/查看书签方法

1.按键盘的ctrl键+D键,收藏本页面

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试第2张

2.下次如何查看收藏的网页?

点击浏览器右上角-【工具】或者【收藏夹】查看收藏的网页

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试第3张


手机浏览器添加/查看书签方法

一、百度APP添加/查看书签方法

1.点击底部五角星收藏本网页

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试第4张

2.下次如何查看收藏的网页?

点击右上角【┇】-再点击【收藏中心】查看

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试第5张

二、其他手机浏览器添加/查看书签方法

1.点击【设置】-【添加书签】收藏本网页

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试第6张

2.下次如何查看收藏的网页?

点击【设置】-【书签/历史】查看收藏的网页

PYTHON语言程序设计(全英) 知到智慧树答案满分完整版章节测试第7张

诗算什斧娜淳喀毙传寂才混哩