Question: 18. Rock-paper-scissors. Write a program, rps.m, which plays the game rock-paper-scissors with the user. The user enters an r, p, s, or q to quit


18. Rock-paper-scissors. Write a program, rps.m, which plays the game rock-paper-scissors with the user. The user enters an "r," "p," "s," or "q" to quit the game. The computer honestly (randomly) selects a choice, then tells the user who won, and prompts for another input. The computer keeps a running total of human wins and losses. Develop the program by writing some simpler versions first. c. Version Three. Write a program, rps3.m, adding the feature that the program keeps a running total of wins and losses by human and computer and reports the cumulative results at the end of every turn
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
