Guest User

Untitled

a guest
Nov 23rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. import random
  2.  
  3. #random number 1-6 to represent the bullet
  4. bullet = random.randint(1,6)
  5.  
  6. alive = True
  7. #loop until "dead"
  8. while alive:
  9.  
  10.     input("Press enter to spin the chamber...")
  11.  
  12.     #random number 1-6 to represet current chamber
  13.     current = random.randint(1,6)
  14.    
  15.     input("Press enter to pull the trigger...")
  16.  
  17.     if current ==  bullet:
  18.         alive = False
  19.     else:
  20.         print ("*CLICK*...You survived this round...")
  21.  
  22. print("*BANG*...You are dead! Not quite how you're reading this..")
Add Comment
Please, Sign In to add comment