游戏设计:函数if条件判断
问答闯关
from sys import exit
def gold_room():
print ("This room is full of gold. How much do you take?")
next = input("> ")
if "0" in next or "1" in next:
how_much = int(next)
else:
dead("请输入数字:")
if how_much < 50:
print( "真棒,你不是贪婪的人!")
exit(0)
else:
dead("你真是贪婪无度!")