Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player_score=0
- computer_score=0
- for repeat in range(0,5):
- player=str(input("Rock, paper or scissors?\n"))
- print("You have selected "+player)
- import random
- rps=random.randint(1,3)
- if rps==1:
- computer="Rock"
- elif rps==2:
- computer="Paper"
- elif rps==3:
- computer="Scissors"
- else:
- print("What just happened?")
- if computer==player:
- print("I selected "+player+" too! We drew on this one.")
- elif computer=="Rock" and player=="Paper":
- print("Paper beats rock, you win!")
- player_score=player_score+1
- elif computer=="Paper" and player=="Rock":
- print("Paper beats rock, I win!")
- computer_score=computer_score+1
- elif computer=="Paper" and player=="Scissors":
- print("Scissors beats paper, you win!")
- player_score=player_score+1
- elif computer=="Scissors" and player=="Paper":
- print("Scissors beats paper, I win!")
- computer_score=computer_score+1
- elif computer=="Scissors" and player=="Rock":
- print("Rock beats scissors, you win dumbass!")
- player_score=player_score+1
- elif computer=="Rock" and player=="Scissors":
- print("Rock beats scissors, I win noob!")
- computer_score=computer_score+1
- else:
- print("What just happened?")
- print("You scored "+str(player_score)+" and I scored "+str(computer_score))
- if player_score > computer_score:
- print("Well done you beat me")
- elif player_score == computer_score:
- print("We drew on this one")
- else:print
- print("Unlucky, I won this one")
- play_again =str(input("Do you wish to play again?\n"))
- if play_again == "Yes" and "yes":
- print("Okay I'll play again")
- else:
- print("Okay, thanks for playing with me")
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement