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 21:10
Dameas communication challenge is due to which factor
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
question
Computers and Technology, 24.06.2019 07:40
What type of multimedia are live news feeds? live news feeds are examples of multimedia.
Answers: 2
You know the right answer?
Add the following features to your RPS program: Handle scenario if enters an integer other than 1,...
Questions
question
Mathematics, 03.02.2020 13:48
question
Social Studies, 03.02.2020 13:48
question
Mathematics, 03.02.2020 13:48
Questions on the website: 13722360