Image Credit: Wikimedia

p1 = input("Enter \"rock\", \"paper\", or \"scissors\" for player 1: ")
p2 = input("Enter \"rock\", \"paper\", or \"scissors\" for player 2: ")
# determine the winner
Player 1Player 2Output
rockrocktie
rockpaperplayer 2 wins
rockscissorsplayer 1 wins
paperrockplayer 1 wins
paperpapertie
paperscissorsplayer 2 wins
scissorsrockplayer 2 wins
scissorspaperplayer 1 wins
scissorsscissorstie
p1 = input("Enter \"rock\", \"paper\", or \"scissors\" for player 1: ")
p2 = input("Enter \"rock\", \"paper\", or \"scissors\" for player 2: ")
if p1 == "rock" and p2 == "rock": print("tie") if p1 == "rock" and p2 == "paper": print("player 2 wins") if p1 == "rock" and p2 == "scissors": print("player 1 wins") if p1 == "paper" and p2 == "rock": print("player 1 wins") if p1 == "paper" and p2 == "paper": print("tie") if p1 == "paper" and p2 == "scissors": print("player 2 wins") if p1 == "scissors" and p2 == "rock": print("player 2 wins") if p1 == "scissors" and p2 == "paper": print("player 1 wins") if p1 == "scissors" and p2 == "scissors": print("tie") if (not (p1 == "rock" or p1 == "paper" or p1 == "scissors") or not (p2 == "rock" or p2 == "paper" or p2 == "scissors")): print("error")
p1 = input("Enter \"rock\", \"paper\", or \"scissors\" for player 1: ")
p2 = input("Enter \"rock\", \"paper\", or \"scissors\" for player 2: ")
if ((p1 == "rock" and p2 == "rock") or (p1 == "paper" and p2 == "paper") or (p1 == "scissors" and p2 == "scissors")): print("tie") if ((p1 == "rock" and p2 == "paper") or (p1 == "paper" and p2 == "scissors") or (p1 == "scissors" and p2 == "rock")): print("player 2 wins") if ((p1 == "rock" and p2 == "scissors") or (p1 == "paper" and p2 == "rock") or (p1 == "scissors" and p2 == "paper")): print("player 1 wins") if (not (p1 == "rock" or p1 == "paper" or p1 == "scissors") or not (p2 == "rock" or p2 == "paper" or p2 == "scissors")): print("error")