测试二:2022中国大学python语言程序设计测试二答案(北理工嵩天 、黄天羽 、礼欣)_木林森呢的博客-CSDN博客
测试三:https://blog.csdn.net/qq_59260978/article/details/123906251
测试四:2022中国大学python语言程序设计测试四答案(北理工嵩天 、黄天羽 、礼欣)_木林森呢的博客-CSDN博客
测试五:2022中国大学python语言程序设计测试五答案(北理工嵩天 、黄天羽 、礼欣)_木林森呢的博客-CSDN博客
测试六:https://blog.csdn.net/qq_59260978/article/details/123907219
一.测验一:Python基本语法元素
1.单项选择题
1.1991 2.缩进在程序中长度统一且强制使用 3.Program 4.s[-3] 5.5MyGod
6.input() 7.type 8.实数 9.in 10.{:.2f}
2.程序设计题
1)Hello World的条件输出
num = eval(input())
F = "Hello World"
if (num == 0):
print(F)
elif num > 0:
print('He', 'll', 'o ', 'Wo', 'rl', 'd', sep='\n')
else:
for ch in 'Hello World':
print(ch)
2)数值运算
s = input()
print("{:.2f}".format(eval(s)))