Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import random
  2. print("1 is rock, 2 is paper, 3 is scizors")
  3. i = input()
  4. comNum = random.randint(1,3)
  5. def roundx():
  6. if i == 1 and comNum == 1:
  7. print("No winner")
  8. elif i == 2 and comNum == 2:
  9. print("No winner")
  10. elif i == 3 and comNum == 3:
  11. print("No winner")
  12. elif i == 2 and comNum == 1:
  13. print("Player Wins!")
  14. elif i == 2 and comNum == 3:
  15. print("Computer Wins")
  16. elif i == 3 and comNum == 1:
  17. print("Computer Wins")
  18. elif i == 3 and comNum == 2:
  19. print("Player Wins!")
  20. elif i == 1 and comNum == 3:
  21. print("Player Wins!")
  22. elif i == 1 and comNum == 2:
  23. print("Computer Wins")
  24. roundx()
  25. print("DID/NT WORK")
  26.  
  27. print("1 is rock, 2 is paper, 3 is scizors")
  28. i = input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement