Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- player = input('rock (r), paper(p) or scissors (s)?')
- print(player, 'vs', end=' ')
- chosen = randint(1,3)
- #print(chosen)
- if chosen == 1:
- computer = 'r'
- elif chosen == 2:
- computer = 'p'
- else:
- computer = 's'
- print(computer)
- if player == computer:
- print('DRAW! ')
- elif player == 'r' and computer == 's':
- print('Take that sucker! ')
- elif player == 'r' and computer == 'p':
- print('Computer wins haha" ')
- elif player == 'p' and computer == 'r':
- print('Take that sucker! ')
- elif player == 'p' and computer == 's':
- print('Computer wins haha! ')
- elif player == 's' and computer == 'r':
- print('Computer wins haha! ')
- elif player == 's' and computer == 'p':
- print('Take that sucker! ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement