|
发表于 2020-5-2 18:04:35
|
显示全部楼层
请回复您的答案^_^
>>>>> 问答题 <<<<<
第 0 题的答案是:idle的交互模式是输入后立马有反馈
编辑器模式是可以自行编辑代码
第 1 题的答案是:除了print input 还有' '__build_class__', '__debug__', '__doc__', '__import__', '__loader__', '__name__', '__package__', '__spec__', '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'
第 2 题的答案是: 不一样 在python里面大小写是严格区分开来的
第 3 题的答案是:通过dir(__builtins__)查看python里面有多少个内置函数
打出代码
f_list = dir(__builtins__)
len_list = len(f_list)
print(len_list)
可以统计有153个内置函数
第 4 题的答案是: 目前还没有发现Tab有什么其他特殊的功能
第 5 题的答案是:第六行 if guess = 8 应该更正为 if guess ==8 因为在python中=是赋值的意思
>>>>> 动动手 <<<<<
请将第 0 题的代码写在下方:
>>> f=365
>>> b=24
>>> c=60
>>> d=60
>>> 一年有多少秒=f*b*c*d
>>> 一年有多少秒
31536000
>>>
请将第 1 题的代码写在下方:
temp = input("嗯?这次数学成绩考多少?")
abc = int(temp)
if abc == 100:
print("好棒,你离女神又进了一步!")
else:
print("小子,想要幸福,就得努力!")
|
|