|
发表于 2019-12-8 09:59:36
|
显示全部楼层
请回复您的答案^_^
>>>>> 问答题 <<<<<
第 0 题的答案是:
交互模式应该是实时程序(python)会进行反馈;
而编辑器模式,则是编辑代码,运行之后才能进行交互。
第 1 题的答案是:
我觉得这节课上的int()也是python的BIF内置函数
第 2 题的答案是:
通过实际操作,我发现,print()和Print()两者是不一样的,print()会打印,而使用Print()则会报错:NameError: name 'Print' is not defined
第 3 题的答案是:
纯小写的:'abs', 'all', 'any', 'ascii', 'bin', 'bool', 'breakpoint', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars', 'zip' 计73个
带下划线:'_', '__build_class__', '__debug__', '__doc__', '__import__', '__loader__', '__name__', '__package__', '__spec__' 计9个
第 4 题的答案是:
tab键除了用于缩进,在IDLE中还可以用于查看函数,即:在输入不完整函数名时,通过tab键可以查看相关函数
第 5 题的答案是:
因为第六行的语句有问题:一个等号=是赋值的意思,if后面应该是条件判断,应该使用两个等号==表示等于
>>>>> 动动手 <<<<<
请将第 0 题的代码写在下方:
print(365*24*60*60)
请将第 1 题的代码写在下方:""" 第002讲_动动手_第1题 """
temp = input("这次数学考试成绩:")
grade = int(temp)
if grade == 100:
print("好棒,你离女神又近了一步^_^")
else :
print("小子,想要幸福,就得努力!")
print("游戏结束,不玩啦^_^")
|
|