Advertisement
Guest User

Kyle Allen

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. player_score=0
  2. computer_score=0
  3. for repeat in range(0,5):
  4. player=str(input("Rock, paper or scissors?\n"))
  5. print("You have selected "+player)
  6. import random
  7. rps=random.randint(1,3)
  8. if rps==1:
  9. computer="Rock"
  10. elif rps==2:
  11. computer="Paper"
  12. elif rps==3:
  13. computer="Scissors"
  14. else:
  15. print("What just happened?")
  16.  
  17. if computer==player:
  18. print("I selected "+player+" too! We drew on this one.")
  19.  
  20. elif computer=="Rock" and player=="Paper":
  21. print("Paper beats rock, you win!")
  22. player_score=player_score+1
  23.  
  24. elif computer=="Paper" and player=="Rock":
  25. print("Paper beats rock, I win!")
  26. computer_score=computer_score+1
  27.  
  28. elif computer=="Paper" and player=="Scissors":
  29. print("Scissors beats paper, you win!")
  30. player_score=player_score+1
  31.  
  32. elif computer=="Scissors" and player=="Paper":
  33. print("Scissors beats paper, I win!")
  34. computer_score=computer_score+1
  35.  
  36. elif computer=="Scissors" and player=="Rock":
  37. print("Rock beats scissors, you win dumbass!")
  38. player_score=player_score+1
  39.  
  40. elif computer=="Rock" and player=="Scissors":
  41. print("Rock beats scissors, I win noob!")
  42. computer_score=computer_score+1
  43.  
  44. else:
  45. print("What just happened?")
  46. print("You scored "+str(player_score)+" and I scored "+str(computer_score))
  47. if player_score > computer_score:
  48. print("Well done you beat me")
  49. elif player_score == computer_score:
  50. print("We drew on this one")
  51. else:print
  52. print("Unlucky, I won this one")
  53.  
  54. play_again =str(input("Do you wish to play again?\n"))
  55. if play_again == "Yes" and "yes":
  56.  
  57. print("Okay I'll play again")
  58. else:
  59. print("Okay, thanks for playing with me")
  60. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement