subject

R-S-P Requirement: - write one program that mimics the Rock-Scissor-Paper game. This program will ask user to enter an input (out of R-S-P), and the computer will randomly pick one and print out the result (user wins / computer wins). - User's input along with computer's random pick will be encoded in the following format:

-- user's rock: 10
-- user's scissor: 20
-- user's paper: 30
-- comp's rock: 1
-- comp's scissor: 2
-- comp's paper: 3

Then add user's input and computer's pick toghter to for a summation, and use switch statement over the summation to tell the result. For example, 12 (10 + 2: u's rock and c's scissor, user wins), 33 (30 + 3: u's paper and c's paper, draw).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
Which of the choices sean are not true when considering virus behavior
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 03:50
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria.what am i?
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
You know the right answer?
R-S-P Requirement: - write one program that mimics the Rock-Scissor-Paper game. This program will as...
Questions
question
Mathematics, 22.08.2019 06:30
Questions on the website: 13722365