Advertisement
AyanUpadhaya

A small game of choice

Apr 6th, 2021
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import random
  2. import time
  3.  
  4. def chooseCave(cavenum):
  5. print("You choose cave: "+cavenum+" to enter")
  6.  
  7. time.sleep(3)
  8.  
  9. print("Lets see your fate")
  10.  
  11. time.sleep(3)
  12.  
  13. fate=["You find treasure","The Dragon eats you"]
  14.  
  15. print(random.choice(fate))
  16.  
  17. print("Play again?")
  18.  
  19. play=input()
  20.  
  21. if play=='yes' or play=='y':
  22. playgame()
  23.  
  24. else:
  25. exit()
  26.  
  27.  
  28. def playgame():
  29. choice=input("Choose a number between 1 and 2:")
  30.  
  31. chooseCave(choice)
  32.  
  33. playgame()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement