Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player1input = raw_input("Player 1: Rock, Paper or Scissors?")
- if player1input == "Rock" or player1input == "rock" or player1input == "Paper"\
- or player1input == "paper" or player1input == "Scissors"\
- or player1input == "scissors":
- player2input = raw_input("Player 2: Rock, Paper or Scissors?")
- if player2input == "Rock" or player2input == "rock" or player2input == "Paper"\
- or player2input == "paper" or player2input == "Scissors"\
- or player2input == "scissors":
- player1choice = player1input.lower() #in case input was upper or lowercase
- player2choice = player2input.lower()
- if player1choice == player2choice :
- print "The result is a tie!"
- elif player1choice == "rock" and player2choice == "paper" :
- print "Paper beats Rock! Congratulations, Player 2!"
- elif player1choice == "rock" and player2choice == "scissors" :
- print "Rock beats Scissors! Congratulations, Player 1!"
- elif player1choice == "paper" and player2choice == "rock" :
- print "Paper beats Rock! Congratulations, Player 1!"
- elif player1choice == "paper" and player2choice == "scissors" :
- print "Scissors beats paper! Congratulations, Player 2!"
- elif player1choice == "scissors" and player2choice == "rock" :
- print "Rock beats Scissors! Congratulations, Player 2!"
- else :
- print "Scissors beats paper! Congratulations, Player 1!"
- else :
- print "This is not a valid object selection"
- else :
- print "This is not a valid object selection”
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement