大学MOOC Python基础编程及Web框架(常州机电职业技术学院)1206305818 最新慕课完整章节测试答案
01 Pthon入门
文章目录
测试
1、判断题:
在对程序进行测试时,只要选择一些特殊的例子,如果这些例子能够正常运行,则说明程序没有问题,测试通过。
选项:
A: 正确
B: 错误
答案: 【 错误】
02 Python变量和数据类型
测试
1、判断题:
由于短路运算规则,布尔运算可能提前结束。
选项:
A: 正确
B: 错误
答案: 【 正确】
2、填空题:
Python把( )、( )和( )看成 False,其他数值和非空字符串都看成 True。
答案: 【 0、空字符串和None】
3、填空题:
a = 'python' print ( 'hello,', a or 'world‘) 输出结果:
答案: 【 hello, python】
4、填空题:
b = '' print ('hello,', b or 'world‘)程序的输出结果是:
答案: 【 hello, world】
03 控制结构
测试
1、判断题:
if 35<pm25<=75:是不正确的写法,应写成:if 35<pm25 and pm25<=75:
选项:
A: 正确
B: 错误
答案: 【 错误】
2、填空题:
print('abc'>'ABC')的结果是:
答案: 【 True】
3、填空题:
使用sqrt函数,需要导入一个库,方法是在:
答案: 【 import math】
04 Python内置对象-字符串列表
测试
1、填空题:
计算视频中的a和b:a-b 写出其错误信息提示:
答案: 【 TypeError: unsupported operand type(s) for -
剩余75%内容付费后可查看
