Guest User

Untitled

a guest
Jan 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #Welcome to the dungeon.
  2. import random
  3.  
  4. Path = 0
  5.  
  6. Left = 1
  7.  
  8. Right = 2
  9.  
  10. print('Welcome to my dungeon. There are traps at every turn. If you (somehow) survive, there will be a prize at the end.')
  11.  
  12.  
  13. while Path < 20:
  14. print('Left or Right?')
  15. guess = input()
  16. guess = (Left) or (Right)
  17. RightWay = random.randint(1, 5)
  18.  
  19. if guess == RightWay:
  20. print('You have made a wrong move, and you have paid for it. You lose.')
  21. break
  22.  
  23. if guess != RightWay:
  24. print('Smart move. Left or Right?')
  25. Path = Path + 1
  26.  
  27. if Path == 10:
  28. print('You have survived the dungeon. As a reward, you have been given your freedom.')
  29. break
Add Comment
Please, Sign In to add comment