Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Welcome to the dungeon.
- import random
- Path = 0
- Left = 1
- Right = 2
- print('Welcome to my dungeon. There are traps at every turn. If you (somehow) survive, there will be a prize at the end.')
- while Path < 20:
- print('Left or Right?')
- guess = input()
- guess = (Left) or (Right)
- RightWay = random.randint(1, 5)
- if guess == RightWay:
- print('You have made a wrong move, and you have paid for it. You lose.')
- break
- if guess != RightWay:
- print('Smart move. Left or Right?')
- Path = Path + 1
- if Path == 10:
- print('You have survived the dungeon. As a reward, you have been given your freedom.')
- break
Add Comment
Please, Sign In to add comment