# Adventure Game Lisa Wood print ("You are lost underground in a maze of tunnels with a fire breathing dragon!") import random dangerTunnel = random.randint(1, 4) # print ("Dragon in tunnel " , dangerTunnel) tunnelChoice = int(input("Choose tunnel 1,2,3 or 4: ")) print ("You chose tunnel ", tunnelChoice) if tunnelChoice == 1: print ("You entered a tunnel with the fire breath dragon. Watch out!!") if tunnelChoice == 2: print ("You entered an empty tunnel. You are safe for now.") if tunnelChoice == 3: print ("You have been rescued by a pink dragon with candy treasure!") if tunnelChoice == 4: print ("You have encountered a yellow dragon with wings, hop on his back and fly away!")
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