Question: In Excel VBA, please type code that will play the game rock paper scissors with a user. Call the Macro RoShamBo. The player will need
In Excel VBA, please type code that will play the game rock paper scissors with a user. Call the Macro "RoShamBo." The player will need to be asked to pick either rock paper or scissors. Then, the code will need to generate a random number using Randomize on a line and then use the built-in function Rnd for the line underneath it. This will generate values 0 to 1.
The randomly generated values of .33 and less will be rock, the numbers between .33 and .66 will be scissors and values greater than .66 will be paper. Please put the "Your Pick" in cell A1, "Computer Pick" in B1, and "Outcome" in cell C1. All of their respective values should be displayed underneath.
IPO
input: 1. Player chooses rock, paper or scissors
Processing: 1. Obtain input from user. 2. Generate a random number from 0 to 1. 3. Code determines the winner. 4. Put the results onto the spreadsheet.
Output: 1. Player choice 2. Computer Choice. 3. Winner
If it runs correctly, I will thumb up. Needs to be in Excel VBA.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
