# Adventure Game Earl Arredondo print ("You are escaping through a maze of tunnels leading towards the exit of imprisonment from the Evil King.") import random dangerTunnel=random.randint(1,2) #print("Guards are on the prowl", dangerTunnel) tunnelChoice=0 while tunnelChoice< 1 or tunnelChoice>2: tunnelChoice= int(input("Choose tunnel 1 or tunnel 2:")) print("You chose tunnel", tunnelChoice) if tunnelChoice==dangerTunnel: print("The guards are patrolling this area, be on the lookout") else: print("You entered an empty path. You are safe for now. Continue forward brave wizard") import random dangerTunnel=random.randint(1,2) #print("The Evil King has noticed your escape, you must act quickly", dangerTunnel) tunnelChoice=0 while tunnelChoice< 1 or tunnelChoice>2: tunnelChoice= int(input("Choose tunnel 1 or tunnel 2:")) print("You chose tunnel", tunnelChoice) if tunnelChoice==dangerTunnel: print("The Evil King has found you personally and used his black magic to trap you; you are now imprisoned for enternity. ") else: print("A guard has witnessed you, but your wits have led you to victory, you see a light at the end of the pathway, you are free.")
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