Skip to content

Rock, Paper, Scissors

Andrew Burke edited this page Apr 3, 2024 · 5 revisions
def rock_paper_scissors(player1, player2):
	if player1 == player2:
	    print("It's a tie!")

	if player2 == "rock":
	    if player1 == "scissors":
	        print("Player 2 wins!")
	    else:
	        print("Player 1 wins!")
	
	if player2 == "paper":
	    if player1 == "scissors":
	      print("Player 2 wins!")
	    elif player1 == "rock":
	      print("Player 1 wins!")
Clone this wiki locally