954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

game with computer

). Design and implement an application that plays the Rock-Paper-Scissors game against the computer. When played between two people, each person picks one of three options (usually shown by a hand gesture) at the same time, and a winner is determined. In the game, Rock beats Scissors, Scissors beats Paper, and Paper beats Rock.
The program should randomly choose one of the three options (without revealing it), then prompt for the user's selection. At that point, the program reveals both choices and prints a statement indicating whether the user won, the computer won, or if it was a tie.
Continue playing until the user chooses to stop, then print the number of user wins, losses, and ties.
Hint: The user should choose from a list of numbered options, and the choice should be matched against a randomly generated number representing the computer's choice.
If you find your code is repeating statements, consider whether the repeated statements might be able to be contained in a method.
A design for the solution to this task is up to you! The output should look like something this:
What is your choice?
1 Play the game
0 Quit
Enter your choice:

(1)

Playing Paper Rock Scissors. The computer has chosen!
1 Paper
2 Scissors
3 Rock
Enter your choice:

(2)

You chose Scissors the computer chose Rock. You lose

What is your choice ?
1 Play the game
0 Quit
Enter your choice:

( 0)

You won 0 times
You lost 1 times
You tied 0 times
Bye

please help me.......

system analysis
Newbie Poster
9 posts since Oct 2009
Reputation Points: 1
Solved Threads: 0
 
peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You