Answer:
'''
Rock, Paper, Scissors:
The Rules:
If player1's move equivalent to player2's move, "It's a tie".
"rock" beats "scissors", "scissors" beats "paper", and "paper" beats "rock"
'''
player_1 = input("Player 1's move: ")
print('*** NO CHEATING ***' * 20)
player_2 = input("Player 2's move: ")
if player_1 or player_2 not in ["rock", "paper", "scissors"]:
print("Invalid input!")
if player_1 == player_2:
print("It's a tie")
else:
if player_1 == "rock":
if player_2 == "scissors":
print("Player 1 won")
elif player_2 == "paper":
print("Player 2 won")
elif player_1 == "scissors":
if player_2 == "paper":
print("Player 1 won")
elif player_2 == "rock":
print("Player 2 won")
elif player_1 == "paper":
if player_2 == "rock":
print("Player 1 won")
elif player_2 == "scissors":
print("Player 2 won")
Explanation:
In the comment part, put the header and the rules of the game
Ask the user to enter the player1's move
Print the asterisks
Ask the user to enter the player2's move
If any of the input is not "rock", "paper", "scissors", state that the input is invalid
Check the inputs. If they are equal, print that it is a tie. Otherwise:
If player1's move is rock. Check player2's move. If it is "scissors", player1 wins. If it is "paper", player2 wins
If player1's move is scissors. Check player2's move. If it is "paper", player1 wins. If it is "rock", player2 wins
If player1's move is paper. Check player2's move. If it is "rock", player1 wins. If it is "scissors", player2 wins