def store(): print "Hello! Welcome to the Awesome Store! Where dreams come true!" print "Can I help you with anything?" answer = raw_input("Type yes or no and hit 'Enter'.").lower() if answer == "yes": print "Okay, but this is an exclusive store! Please answer a few questions first... Um, the sun is a star! True or False?" answer = raw_input("Type true or false and hit 'Enter'.").lower() if answer == "true": print "Wow, you're smart! Okay, you can come in now. I would also like to point out that we are having a sale on Pythons... 100% off today only!" elif answer == "false": print "Well, that's wrong. You'll have to go now. Do I need a security guard to escort you or something?" elif answer == "no": print "Um, okay... Pythons on sale today... 100% off. Also this is an exclusive store, let me ask you some questions!" answer = raw_input("Type yes or no and hit 'Enter'.").lower() if answer == "yes": print "Yeah, so... Pythons on sale today. True or False?" answer = raw_input("Type true or false and hit 'Enter'.").lower() if answer == "true": print "Okay, good. You can come in now!" elif answer == "false": print "Gosh! You must have short term memory! Keep on moving!" elif answer == "no" or answer =="n": print "Well too bad! Answer this question! Am I... pretty?" answer = raw_input("Type yes or no and hit 'Enter'.").lower() if answer == "yes": print "Thank you! You're the sweetest! You may come in! At the register ask for another 50% off anything! My treat!" elif answer == "no": print "WHAT?! How could you? SECURITY!!" store() store() print "THE END! (or is it?)" name = raw_input("Hey you! Yes. What is your name?") rate = raw_input("Did you like the game? Type in yes or no.") print "So, %s, is it? Right. Thanks for playing my text adventure game! Your response to this game in liking it was- %s!" % (name, rate)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question