Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I need the code to create an output just like the one I posted below please. Programming Assignment #1 Rock, Paper, Scissors DUE Thursday,

Hello, I need the code to create an output just like the one I posted below please.
image text in transcribed
image text in transcribed
Programming Assignment \#1 Rock, Paper, Scissors DUE Thursday, February 21" @11:59pm (VIA CANVAS) Write a program that prompts the user (or "Player 1") to input an integer value between 1 and 3 (where 1=paper, 2=scissor, and 3=rock). This input should be passed into a string function called player_RPS(), and returns a string value indicating the selection of paper, scissors, or rock (as mentioned above). Next, the returned string value, along with a generated input from the computer, should be passed into a void function called RPS_comparison(), and determines whether the user's input or the computer's generated input is the winner or if both inputs result in a tie. This program should play this game ten consecutive times and call a function named winner_tally_to file() to append the winner (either PLAYER1-WINSHI, COMPUTER-WINSHI, or TIEIII) of each match to a text file called rps.txt. After the 10th match, this program should call a function named official_tally from_file() to read the stored data from the rps. txt file back into the program, place this data into a 25 two-dimensional array, and print this data to screen after the array is traversed. While this data is being stored in the array, the program should tally the number wins for Player 1, Computer, and TIE, respectively, and output the entity with the most wins: Example: PLAYER 1 HAS THE MOST WINS IN THE TEN GAME SERIES THE COMPUTER HAS THE MOST WINS IN THE TEN GAME SERIES MAUORITY OF THE GAMES ENDED IN A TIE Code for creating the computer's generated input is provided below. This snippet of code can be placed into the main function: For those who are not accustomed to the Paper, Scissor, Rock game, paper beats rocks, scissor beats paper, and rock beats scissor. Your output to the program should resemble the following (see next page): BDCK, PAPER, sCISSOAS QUAE (MLTCH AI) player 11 Enter your chalce (1epaper, 2usclssers, 3ureck) t. 3 player. 1 eaterted rock os the chalct. Ccaputer selected scissars as the chalct. PLAYEA 1 INS MDCK, PAPER, scissons beere (MATtH A2) Player 14 Enter your chaice (1-paper, 2utelasert, 3ureck) t. 2 player 1 entered scitsori as the choice. Compoter selected rock as the choict. GKNFUTEA WINS AOCK, PAPER, SCTSSOMS. CAOC (MLTCH 3) player 14 Enter your choice (1epuser, 2escisters, 3oreck) I 1 ) Player 1 entered paper as the choict. Cemputer selected paper as the eholet. It's A TIE ROCK, PAPER, SCISSOAS EANE (NAFOH 14 ) Ployer 14 Enter your cheice (1npeper, 2nstisisrt, 3nreck) t 1 player 1 pntered paper as the choict. Cempoter selected peper as the shaice. 11IS A TAE Playet 1 : Entet yout choice (1=paper, 2etcisters, Jnteck) ; 2 . Player 1 entered scissort as the chaice. Compoter selected scissors en the eholet. 1T's A TIE loyer. 1 entered rock es the chatce. gotputer ielected ictsers is the chalce. plever 1 yeas layer 1t tater yper shelet l1-eaper, 2-3efasert, 3erectiti 3 loyer 1 dentered reca wa the chatce. gatputer aelected peper wa the oheled, gooputa ytas layer it fiter your thatee linaper, zeacfictort, 3erectit 2. player 1 entered etisetre of the choien. Totputer welected sapet of the cheich. PLYER 1 YANS loyer 1 antered paper an the chedce. Computer ielected ictsceri as the chalcti- peaplaf YHNS layer 1 tatente lelisers is the cholet. Qaputer aelected rock. as the chatce. gasplten vins LaYtedentessiti fititi fititi fiti11 LAYRR2-ALNS111 L.YYER-AINS I If goaptara-yensa

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

How does the price system serve as a rationing mechanism?

Answered: 1 week ago

Question

How many languages do you speak?

Answered: 1 week ago