Reference no: EM131265996
Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows.
1. When the program begins, the user is asked to seed the random number generator, and a random number in the range of 1 through 3 is generated.
If the number is 1, then the computer has chosen rock.
If the number is 2, then the computer has chosen paper.
If the number is 3, then the computer has chosen scissors.
(Don't display the computers choice yet.)
2. Using a menu the user enters his or her choice of rock, paper, or scissors at the key-board.
3. The menu displays the options
1-rock
2-paper
3-scissors
4. The computers choice is displayed.
5. A winner is selected according to the following rules:
If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins. ( Scissors cuts paper.) If one player chooses paper and the other player chooses rock, then paper wins. ( Paper wraps rock.) If both players make the same choice, the game ends in a tie
Be sure to divide the program into at least the following methods
1. Display the menu, and get the users response
2. Get the random number
3. Determine the winner
4. Output the winner.
Appraisal value of this acquired land
: On May 26, 2012, the Georgia Corp. acquired a piece of land by issuing 60,000 shares of its $9 par value common stock. The list price of the land was $625,000 and on May 26, 2012, Georgia's common stock was actively trading in the marketplace at $10 ..
|
Describe the effects of paralysis on the skeleton
: 1. Following a severe spinal cord injury in the lumbar region, the voluntary muscles of the legs and hips will be paralyzed. Describe the effects of paralysis on theskeleton.
|
Find the flux/pole of the rotating flux density wave
: If the stator resistance and leakage reactance are assumed negligible, find the flux/pole of the rotating flux density wave.
|
What are the prime costs and conversion costs per unit
: What is the product unit cost for Job 14, which consists of 300 units and has total manufacturing costs of direct materials, $4,500; direct labor, $7,500; and overhead, $3,600? What are the prime costs and conversion costs per unit?
|
Write a program that lets the user play the game of rock
: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows.
|
Context of the dynamic stochastic
: Modern macroeconomic models can be distinguished by their impulse, amplification, and propagation mechanisms. Within the context of the dynamic stochastic general equilibrium model, identify those mechanisms and discuss their merits and weaknesses..
|
Interest and principal will be repaid on the maturity date
: A 1- year, 6%, $30,000 promissory note was signed at the Citizens National Bank. Interest and principal will be repaid on the maturity date of Feb 1, 2014 _This is for the month of Feb 2013 -Im trying to figure out the amount. Cash: ? Note..
|
Find the per phase emf if the conductors are connected
: A 50-Hz synchronous salient pole generator is driven by a hydro-electric turbine at a speed of 125 rpm. There are 576 stator slots with two conductors per slot. The air-gap diameter is 6.1 m and the stator length is 1.2 m. The sinusoidally distrib..
|
Action the overall economy will suffer
: An interesting paradox called the "Paradox of Thrift" arises when households become concern about their future and attempt to increase their saving. As a consequence of such action the overall economy will suffer. Explain. Do you agree with thi..
|