![]() |
Choose your own adventure game - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Choose your own adventure game (/thread-27898.html) |
Choose your own adventure game - noahc2004 - Jun-26-2020 I get confused when creating these. I want to end the code if you choose one option so that route stops but carry on in the other. Please help. import time Gamertag = input("What is your Gamertag? ") print("Welcome" ,Gamertag) time.sleep(3) game = input("Do you want to play a game? ") if game == "yes": print("LOADING... ") elif game == "no": print("Quitting application") RE: Choose your own adventure game - DPaul - Jun-26-2020 Your second python tag should have "\". Then you can fix the indentation, so we see what is going on. Paul RE: Choose your own adventure game - DPaul - Jun-26-2020 OK, this code does what it is supposed to do. Paul |