Mission
Create a program that allows two users to play rock, paper, scissors.
Rules: http://en.wikipedia.org/wiki/Rock-paper-scissors
Rules: http://en.wikipedia.org/wiki/Rock-paper-scissors
Details
Your program should ask two users to input their names. They will then take turns inputting their command. Your program should accept the commands "rock", "paper", and "scissors."
Your program should be able to handle a fourth, invalid input from each user. If it has an invalid input, print an error message.
Determine a winner according the rules of the game, and output the winner's name to the console.
Example Program
Hello second player. What is your name? Wyatt
Please choose your command Nate: rock
Please choose your command Wyatt: scissors
Nate is the winner!
Expand your program so that it can play Rock, Paper, Scissors, Lizard, Spock. This is worth an additional two points.
Rules: http://en.wikipedia.org/wiki/Rock-paper-scissors-lizard-Spock
Rules: http://en.wikipedia.org/wiki/Rock-paper-scissors-lizard-Spock
No comments:
Post a Comment