print 'you enter a dark room with two doors. Do you want to enter door #1 or door #2?' #this text allows players to be given 2 acceptable varibelsin this script door = raw_input('>') #raw_input means that it will accept 'Any' given varible, #Of course this will only work if the script down below has a use for the varibles you have inputed, #if not the program will say 'Synatax Error' if door == "1": print 'theres a giant bear eating what seems to be a human arm, though its so damaged it\'s hard to be sure' print 'what do you want to do?' print '#1 try to take the arm' print '#2 scream at the bear' print '#3 run and go to door #2' bear = raw_input('>' if bear == "1" print 'you approach the bear slowly, never breaking eyr contact. After what feel like an eternity you are finaly face to face with the bear. \nyou grab the arm and pull. the bear responds by eaating your face. well done! elif bear == "2" print 'you scream at the bear, a decent sound as well. the bear however was not inpressed it would seem\nas he instantaly eats your face. Well done! elif bear == "3"
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