|
发表于 2024-11-28 13:05:29
|
显示全部楼层
请回复您的答案^_^
-------- 问答题 --------
第 0 题的答案是:交互模式是在界面上一行一行输入,
编辑器模式以文件为单位编辑和运行
第 1 题的答案是:int() 和 dir()
第 2 题的答案是:不一样,python的变量名大小写敏感
第 3 题的答案是:161个,len(dir(__builtins__)) 输出161
第 4 题的答案是:没有
第 5 题的答案是:= 不是逻辑运算符,表达式guess = 8不能作为条件表达式:
print(type(guess = 8))
Traceback (most recent call last):
File "<pyshell#43>", line 1, in <module>
print(type(guess = 8))
TypeError: type() takes 1 or 3 arguments
guess=8
print(type(guess == 8))
<class 'bool'>
-------- 动动手 --------
请将第 0 题的代码写在下方:
secs_in_a_year = 365 * 24 * 60 *60
print(secs_in_a_year)
31536000
请将第 1 题的代码写在下方:
temp = input("请输入这次数学考试的成绩:")
scores = int(temp)
if scores == 100:
print("好棒!你离女神又近了一步^_^")
else:
print("小子,想要幸福,就得努力!")
|
|