对于练习20的额外部分,我被告知要评论我认为每一行做了什么。我发现seek令人困惑。如果有人愿意查看我在源码上的评论,看看我的理解是否正确。我可以跳过它,但我觉得这很重要,我理解这一点。from sys import argv #imports argv from sys moduel
def print_all(f): #defines a function that uses the read(
嘿,伙计们,我不明白在runner函数上或之后有什么东西。from sys import exit quips = ['you died. you kinda suck at this.', 'your mum would be proud of you, if she where smarter.', 'such a luser', 'i have a small puppy that\'s better than you'
由于某些原因,当游戏到达金色房间时,它不能正常工作。当我输入任何数字时,我得到的是死亡信息‘伙计,学会输入一个数字’from sys import exit
print 'this room is full of gold, how much do you take?'
if '0' in next or '1' in next: else:
dragon_room中的while循环没有运行,我不确定原因。我一次又一次地收到“>>”提示,程序再也不会退出,也不会把我带到另一个房间。 print "This room is full of candy bars. How many do you take?"
if "0" in next or "1" in next:
h