从系统导入退出
def start():
print "You woke up in a dungeon"
print "There is three weapon in front of you"
print "A sword, a staff and dagger"
print "Which one do you choose"
choice = raw_input("")
if choice == "dagger":
print "A rogue huh?"
elif choice == "staff":
print "A wizard how interesting..."
elif choice == "sword":
print "A warrior."
else:
print "..."
dungeon_path()
def dungeon_path():
if choice == "dagger":
print "Which way you choose rogue"
start()
我想打印最后一行,如果我选择匕首在第一个功能,但我似乎无法得到它的工作我试图给选择一个值,然后用“如果”,但它也没有这样做,所以我该怎么办
可以将
choice
变量作为参数传递给dungeon_path
函数:相关问题 更多 >
编程相关推荐