Wednesday, April 2, 2014

SOLUTION Exercise 8: rock, paper, scissors

I was slightly disappointed by how few people attempted the exercise this week - try it, it's a fun one, and look at the sample solutions if you are stuck. I was extremely happy with the solutions I did see! Feel free to reach out to me personally if you want more personalized help.

Exercise

Make a two-player Rock-Paper-Scissors game. (Hint: Ask for player plays (using input), compare them, print out a message of congratulations to the winner, and ask if the players want to start a new game)
Remember the rules:
  • Rock beats scissors
  • Scissors beats paper
  • Paper beats rock

Sample solution

No comments:

Post a Comment