对应课程:点击查看
起止时间:2021-03-08到2021-07-18
更新状态:暂停更新
Week 14 Try..exception..lambda..exercise One short mock test
1、 Which of the following cannot be a variable?
A:init
B:in
C:it
D:on
答案: in
2、 Which of the following is an invalid statement?
A:abc = 1,000,000
B: a b c = 1000 2000 3000
C:a,b,c = 1000, 2000, 3000
D:a_b_c = 1,000,000
答案: a b c = 1000 2000 3000
3、 s='{0}, {1}, and {2}’
s.format(‘hello’, ‘good’, ‘morning’)
A:good, hello, morning’
B:‘hello, good, morning’
C:‘hello, good, and morning’
D:Error
答案: ‘hello, good, and morning’
4、 i = 0
while i < 3:
print(i)
i += 1
else:
print(0)
A:1 2 0
B:0 1 2 0
C:0 1 2
D:Error
答案: 0 1 2 0
5、 for i in [1, 2, 3, 4][::-1]:
print (i)
A:1 2 3 4
B:4 3 2 1
C:error
D:none of the mentioned
答案: 4 3 2 1
6、 What is the data type of (1)?
A:tuple
B:int
C:list
D:both tuple and int
答案: int
7、 print(‘abc’.islower())
A:true
B:false
C:None
D:Error
答案: true
8、 Which of the following functions accepts only integers as arguments?
A:ord()
B:min()
C:chr()
D:any()
答案: chr()
9、 a={1:”A”,2:”B”,3:”C”}
print(a.get(1,4))
A:1
B:A
C:4
D:Error
答案: A
10、 def a(b):
b = b + [5]
c = [1, 2, 3, 4]
为了方便下次阅读,建议在浏览器添加书签收藏本网页
添加书签方法:
1.电脑按键盘的Ctrl键+D键即可收藏本网页
2.手机浏览器可以添加书签收藏本网页
获取更多MOOC答案,欢迎在浏览器访问我们的网站:http://mooc.mengmianren.com
注:请切换至英文输入法输入域名,如果没有成功进入网站,请输入完整域名:http://mooc.mengmianren.com/
我们的公众号
打开手机微信,扫一扫下方二维码,关注微信公众号:萌面人APP
本公众号可查看各种网课答案,还可免费查看大学教材答案
点击这里,可查看公众号功能介绍
一键领取淘宝,天猫,京东,拼多多无门槛优惠券,让您购物省省省,点击这里,了解详情