Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- choice = ['scissor', 'paper', 'stone']
- com = randint(0, 2)
- print(com)
- print(choice[com])
- com_choice = choice[com]
- print("Welcome to Scissor, Paper Stone!" )
- print("Press 1 for Scissor, 2 for Paper and 3 for stone")
- user = input("Enter here: ")
- user = int(user) - 1
- print(user)
- user_choice = choice[user]
- print(user_choice)
- if com_choice == 'scissor':
- if user_choice == 'scissor':
- print('Draw')
- if user_choice == 'paper':
- print('Computer Wins')
- if user_choice == 'stone':
- print('User Wins')
- if com_choice == 'paper':
- if user_choice == 'scissor':
- print('User Wins')
- if user_choice == 'paper':
- print('Draw')
- if user_choice == 'stone':
- print('Computer Wins')
- if com_choice == 'stone':
- if user_choice == 'scissor':
- print('Computer Wins')
- if user_choice == 'paper':
- print('User Wins')
- if user_choice == 'stone':
- print('Draw')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement