Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- fox = random.randint(0,900)
- def thrower1(fox):
- fox = random.randint(0,900)
- if fox <= 300:
- return 'r'
- elif 300 < fox <= 600:
- return 's'
- else:
- return 'p'
- rd1 = thrower1(fox)
- choose = str(raw_input("Rock, Paper, or Scissors?"))
- choice = choose.lower()[0:1]
- def ref(choice, rd1):
- if choice == 'r' and rd1 == 'p':
- return 'Computer throws paper, You Win!'
- elif choice == 'p' and rd1 == 'r':
- return 'Computer throws rock, You Win!'
- elif choice == 's' and rd1 == 'p':
- return 'Computer throws paper, You Win!'
- elif choice == rd1:
- return "Draw"
- else:
- return "I Win!"
- results = ref(choice, rd1)
- print results
Advertisement
Add Comment
Please, Sign In to add comment