Skip to content
Chad P edited this page Jan 23, 2023 · 11 revisions

Labs

Rock Paper Scissors

Goal

Write a program that plays the game rock, paper, scissors with a user.

Have your program generate a random answer for the computer, but don't display it. Then, ask the player for their answer.

  • Paper wins over Rock
  • Rock wins over Scissors
  • Scissors win over Paper

Example

Ready to play Rock Paper Scissors?
What do you pick?  Rock
I choose Scissors.  You won!
  • Bonus: Do this in a loop. Best of 3.

Solution

Please view the solution after you have attempted it on your own.

Clone this wiki locally