mburton2

rpc1

Sep 6th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. import random
  2. import math
  3.  
  4. fox = random.randint(0,900)
  5.  
  6.  
  7. print '*' * 50
  8. print ' ' * 10, 'Welcome To Rock Paper Fucking Scissors!'
  9. print '*' * 50
  10. opener = raw_input('DO YOU THINK YOU HAVE WHAT IT TAKES!!!')
  11. #opener2 =
  12. zero = int(0)
  13. num_rounds_won = zero
  14.  
  15.  
  16.  
  17. def thrower1(fox):
  18.     fox = random.randint(0,900)
  19.     if fox <= 300:
  20.         return 'r'
  21.     elif 300 < fox <= 600:
  22.         return 's'
  23.     else:
  24.         return 'p'
  25.  
  26. rd1 = thrower1(fox)
  27. while True:
  28.     choose = str(raw_input("Rock, Paper, or Scissors?"))
  29.     choice = choose.lower()[0:1]#
  30.     raw_input("play again?")
  31.         if yes ref()
  32.    
  33. def ref(choice, rd1):
  34.     if choice == 'r' and rd1 == 'p':
  35.         return num_rounds_won + 1
  36.     elif choice == 'p' and rd1 == 'r':
  37.         return num_rounds_won + 1
  38.     elif choice == 's' and rd1 == 'p':
  39.         return num_rounds_won + 1
  40.     elif choice == rd1:
  41.         return "Draw"
  42.     else:
  43.         return "I Win!"
  44.        
  45.    
  46. results = ref(choice, rd1)
  47. print results
  48. print num_rounds_won + 1
Advertisement
Add Comment
Please, Sign In to add comment