Flow controls: Conditions · 19 / 22 Exercise Medium

Rock, paper, scissors

Objective

In the game of rock, paper, scissors, rock beats scissors, scissors beat paper and paper beats rock. If both choose the same, it is a draw.

Instructions

  • Read the move of player 1 and that of player 2, one per line. It is always rock, paper or scissors.
  • Show Player 1 wins, Player 2 wins or Draw.
Input
rock
scissors
Output
Player 1 wins

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise