Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. from random import randint
  2.  
  3. choice = ['scissor', 'paper', 'stone']
  4. com = randint(0, 2)
  5. print(com)
  6. print(choice[com])
  7. com_choice = choice[com]
  8.  
  9. print("Welcome to Scissor, Paper Stone!" )
  10. print("Press 1 for Scissor, 2 for Paper and 3 for stone")
  11. user = input("Enter here: ")
  12. user = int(user) - 1
  13. print(user)
  14. user_choice = choice[user]
  15. print(user_choice)
  16.  
  17. if com_choice == 'scissor':
  18. if user_choice == 'scissor':
  19. print('Draw')
  20. if user_choice == 'paper':
  21. print('Computer Wins')
  22. if user_choice == 'stone':
  23. print('User Wins')
  24. if com_choice == 'paper':
  25. if user_choice == 'scissor':
  26. print('User Wins')
  27. if user_choice == 'paper':
  28. print('Draw')
  29. if user_choice == 'stone':
  30. print('Computer Wins')
  31. if com_choice == 'stone':
  32. if user_choice == 'scissor':
  33. print('Computer Wins')
  34. if user_choice == 'paper':
  35. print('User Wins')
  36. if user_choice == 'stone':
  37. print('Draw')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement