有没有可能让一个用户为一个变量输入两个新的答案,并在每次被询问时进行更改?

2024-06-06 22:00:35 发布

您现在位置:Python中文网/ 问答频道 /正文

elif direction == "kitchen".lower():
    print""
    print("• As you enter the kitchen you get blasted with heat. "+kitchen)            
    print""
    print("• "+lobby)
    print""
    direction=raw_input("• Where would you like to go next? ")
    if direction == "kitchen".lower():
        print""
        print("• As you enter the kitchen again the stove explodes and you die             in the fire.")
        print""
        print("• Game over.")
    else:
        print""
elif direction == "closet".lower():
    print""
    print("• As you step closer to the closet you can tell the door was      smashed down by something.")
    print""

有没有可能改变方向从“厨房”到“壁橱”或我需要两个变量?这是一个文本冒险游戏,试图进入新的房间


Tags: thetoyougetaswithlowerprint