鱼C论坛

 找回密码
 立即注册
楼主: 小甲鱼

[课后作业] 第002讲:用Python设计第一个游戏 | 课后测试题及答案

    [复制链接]
发表于 2022-7-17 23:56:52 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:交互模式按回车后就会运行,而编辑器模式可以将整段代码都输入完毕后再运行

第 1 题的答案是:if else

第 2 题的答案是:不一样

第 3 题的答案是:153

第 4 题的答案是:tab可以自动补全函数名

第 5 题的答案是:应该是==

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:
>>> 365*24*60*60
31536000

请将第 1 题的代码写在下方:
"""成绩"""
temp = input("请输入这次数学考试的成绩:")
score = int(temp)

if score == 100:
    print("好棒,你离女神又近了一步^_^")
else:
    print("小子,想要幸福,就得努力!")

print("游戏结束,不玩啦^_^")
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 03:37:07 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:
答:  交互模式 powershell 输入一行代码,自动输出一行代码
编辑模式。 一起输入,一起输出,必须由print来执行

第 1 题的答案是:
int()

第 2 题的答案是:
不一样 不能大写
第 3 题的答案是:
68个BIF
第 4 题的答案是:
自动补全
第 5 题的答案是:
=是赋值, == 是判断是否等于
>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 06:26:21 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 09:25:21 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:
8
第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 10:16:03 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 10:34:43 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 10:46:55 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 11:24:06 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:交互模式直接执行代码,编辑器模式则需要点击run来执行

第 1 题的答案是:if函数

第 2 题的答案是:不一样

第 3 题的答案是:35

第 4 题的答案是:相当于四个空格

第 5 题的答案是:guess后应该用两个等号==

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:
365*24*60*60


请将第 1 题的代码写在下方:
temp = input("这次数学考试的成绩怎么样?")
guess = int(temp)

if guess = 100:
    print("好棒,你离女神又近了一步^_^")
else:
    print("好棒,你离女神又近了一步^_^")
   
print("游戏结束,不玩啦^_^")
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 11:54:11 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:
交互模式更像是一种实时验证面板,便于代码编写者实时测定代码编写是否错误
而编辑器模式是IDLE的核心编写面板,编写者在该面板上完成几乎所有的代码编写工程,最终运行并检测是否有误

第 1 题的答案是:
int()整形函数

第 2 题的答案是:
不一样,在Python中区分大小写字母,这是两种不同函数

第 3 题的答案是:
152个

第 4 题的答案是:
键入空格

第 5 题的答案是:
“if guess == 8"才对

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:
365*24*60*60
31536000

请将第 1 题的代码写在下方:
"""用Python设计第一个游戏"""

temp = input("本次数学考试成绩:")
guess=int(temp)

if guess == 100:
    print("好棒!\n你离女神又近了一步!")
else:
    print("小子,想要幸福,就得努力!")

print("Game Over")
   
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 13:43:37 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 14:09:15 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:
交互模式:写一个代码,它给你反馈
编辑器模式:
第 1 题的答案是:
int、if、else
第 2 题的答案是:
不一样
第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:
if guess == 8:
>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:
60 * 60 * 24 * 365
31536000

请将第 1 题的代码写在下方:
temp = input("这次的数学考试成绩:")
guess = int(temp)

if guess == 100:
    print("好棒,你离女神又进了一步^_^")
else:
    print("小子,想要幸福,就得努力!")
   
print("游戏结束,不玩啦^_^")
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 14:29:44 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:
交互模式为一条输入命令一条输出命令,编辑器是编译完成整个程序后运行。
第 1 题的答案是:
sum
第 2 题的答案是:
不一样
第 3 题的答案是:
68
第 4 题的答案是:
补足
第 5 题的答案是:
guess == 8才行
>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:

365 * 24 * 60 * 60

请将第 1 题的代码写在下方:"""小甲鱼作业game"""

temp = input("请输入这次数学考试的成绩:")
math = int(temp)

if math == 100:
    print("好棒,你离女生又近了一步")
else:
    print("小子,想要幸福,就得努力!")
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 14:53:08 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:交互模式有即时反馈,编辑器模式没有

第 1 题的答案是:int()

第 2 题的答案是:功能室一样的

第 3 题的答案是:

['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning', 'ChildProcessError', 'ConnectionAbortedError', 'ConnectionError', 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False', 'FileExistsError', 'FileNotFoundError', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError', 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'ModuleNotFoundError', 'NameError', 'None', 'NotADirectoryError', 'NotImplemented', 'NotImplementedError', 'OSError', 'OverflowError', 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError', 'RecursionError', 'ReferenceError', 'ResourceWarning', 'RuntimeError', 'RuntimeWarning', 'StopAsyncIteration', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'TimeoutError', 'True', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning', 'ValueError', 'Warning', 'WindowsError', 'ZeroDivisionError', '__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']

第 4 题的答案是:IDLE会提供一些建议

第 5 题的答案是:不能,有部分标点符号为中文标点符号

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:

a=365
b=24
c=60
print(a*b*c)

请将第 1 题的代码写在下方:

temp=input("请输入这次数学考试成绩:")
guess=int(temp)

if guess==100:
    print("好棒,你离男神又近一步了^_^")
else:
    print("小子,想要幸福,就要努力!")
print("游戏结束,不玩啦^_^")
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 14:58:18 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:交互模式主要是输入一句系统就会回复一句,编辑模式就可以把自己所有想的代码全部写完,然后保存再开始运行。

第 1 题的答案是:

第 2 题的答案是:不一样

第 3 题的答案是:35

第 4 题的答案是:自动填充

第 5 题的答案是:if guess == 8:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:
365*24*60*60


请将第 1 题的代码写在下方:
print("请输入这次数学考试的成绩")
score = int(input())

if score == 100:
    print("好棒,你离女神又近了一步^_^")
else:
    print("小子,想要幸福,就得努力!")
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 15:08:19 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 15:44:21 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 16:07:05 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 16:26:56 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:即时演算和秋后算账

第 1 题的答案是:int()

第 2 题的答案是:不一样,一个是内置函数,一个相当于变量名

第 3 题的答案是:155个

第 4 题的答案是:这题不知道

第 5 题的答案是:8前面的=号错了,=是赋值,==才 等于

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:
365*24*60*60


请将第 1 题的代码写在下方:
temp = input("这次数学考试的成绩:")
guess =int(temp)

if guess == 100:
    print("好棒,你离女神又近了一步^_^")
else:
    print("小子,想要幸福,就得努力!")

print("游戏结束,不玩啦^_^")
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 16:44:18 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:交互模式运行一个代码得到一个反馈,编辑器模式可以自行选择运行
第 1 题的答案是:['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning', 'ChildProcessError', 'ConnectionAbortedError', 'ConnectionError', 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False', 'FileExistsError', 'FileNotFoundError', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError', 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'ModuleNotFoundError', 'NameError', 'None', 'NotADirectoryError', 'NotImplemented', 'NotImplementedError', 'OSError', 'OverflowError', 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError', 'RecursionError', 'ReferenceError', 'ResourceWarning', 'RuntimeError', 'RuntimeWarning', 'StopAsyncIteration', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'TimeoutError', 'True', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning', 'ValueError', 'Warning', 'WindowsError', 'ZeroDivisionError', '__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 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:if guess后面应该是==而不是=

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:

>>> 365*24**60*60
1422717316533106137819196624526585139895938305704660363062944616806373510916346373734400

请将第 1 题的代码写在下方:
"""第一个小游戏"""

temp = input("请输入这次数学考试的成绩:")
guess = int(temp)

if guess ==100:
    print("好棒,你离女神又近了一步")
else:
    print("小子,想要幸福还得努力")
print("游戏结束,不玩啦——")

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-7-18 16:58:12 | 显示全部楼层
请回复您的答案^_^

>>>>> 问答题 <<<<<

第 0 题的答案是:

第 1 题的答案是:

第 2 题的答案是:

第 3 题的答案是:

第 4 题的答案是:

第 5 题的答案是:

>>>>> 动动手 <<<<<

请将第 0 题的代码写在下方:



请将第 1 题的代码写在下方:
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-3-7 00:41

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表