Course of Raku / Addendum 🆕 / Flow and functions / Control flow and logic / Exercises
Rock, paper, scissors
Problem
Judge rounds of rock–paper–scissors. For the match-ups
rock/scissors,
paper/rock, and
paper/paper, print which player wins, or
tie when the moves are equal.
Example
The program prints:
rock vs scissors: rock wins
paper vs rock: paper wins
paper vs paper: tieSolution
Course navigation
← Solution: Kind of triangle | Solution: Rock, paper, scissors →