###DEMO### #Options- optionl = ["Left", "left", "l", "L", "LEFT"] optionr = ["Right", "right", "r", "R", "RIGHT"] opy = ["Yes", "yes", "y", "Y", "YES"] opn = ["No", "no", "n", "N", "NO"] res = raw_input('You walk along a dark hallway. You come to to doors. You have two choices. Left or right. Remember: YOUR DESCISION MEANS LIFE OR DEATH: ') #Analog 1.0 if res in optionl: print "You walk through the left door, slowly. The wood breaks beneath your feet. YOU DIED" elif res in optionr: print "You walk through the right door. You live." ans = raw_input('Continue?') if ans in opy: ans2 = raw_input('TO BE CONTINUED') else: print "GAME OVER" else: print "GAME OVER"
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