Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import choice
- options = ['rock', 'paper', 'scissor']
- option = int(input('Choose your option: \n'
- '[1] Rock\n'
- '[2] Paper\n'
- '[3] Scissor\nYour Option: '))
- option_pc = choice(options)
- def vencedor(option, option_pc):
- if option == 1 and option_pc == 'scissor':
- print(f'The pc chose {option_pc} and you chose Rock. YOU WIN!')
- elif option == 2 and option_pc == 'rock':
- print(f'The pc chose {option_pc} and you chose Paper. YOU WIN!')
- elif option == 3 and option_pc == 'paper:':
- print(f'The pc chose {option_pc} and you chose Scissor. YOU WIN!')
- elif option == option_pc:
- print(f'The pc chose {option_pc} and you chose {option}. Nobody win')
- else:
- print(f'The pc chose {option_pc} and you chose {option}. YOU LOSE')
- vencedor(option, option_pc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement