subject

Add the following features to your RPS program: Handle scenario if enters an integer other than 1, 2, or 3. Print "invalid" message and loop again.
Handle the exeption if user enters "abc" or a float. Print "invalid" message and loop again
Keep a counter of how many times the human has won, and how many times comp has won.
After each round, print the outcome and print the counters.
Keep playing until the human or the computer wins twice.
Change your logic to determine the outcome:
Add a 2D list at the top of your code that stores all outcome combinations
Replace your if statement – lookup the outcome from the 2D list
Print a "goodbye" message at the end of the program.
Requirements – Planned Output:
Enter 1 for Rock, 2 for Paper, 3 for Scissors: abc
Please only enter an integer. Try again.
Enter 1 for Rock, 2 for Paper, 3 for Scissors: 60
Invalid int. Please enter 1, 2, or 3. Try again.
Enter 1 for Rock, 2 for Paper, 3 for Scissors: 2
You chose paper
The computer chose scissors
You lost.
Human: 0 Computer: 1
Enter 1 for Rock, 2 for Paper, 3 for Scissors: 3
You chose scissors
The computer chose paper
Congrats, you won!
Human: 1 Computer: 1
Enter 1 for Rock, 2 for Paper, 3 for Scissors: 1
You chose rock
The computer chose scissors
Congrats, you won!
Human: 2 Computer: 1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 Β½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1Β½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
This chapter lists many ways in which becoming computer literate is beneficial. think about what your life will be like once you’re started in your career. what areas of computing will be most important for you to understand? how would an understanding of computer hardware and software you in working from home, working with groups in other countries and contributing your talents.
Answers: 1
question
Computers and Technology, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
You know the right answer?
Add the following features to your RPS program: Handle scenario if enters an integer other than 1,...
Questions
question
History, 15.04.2020 16:59
question
English, 15.04.2020 16:59