Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Add to lab 4: Lame Game Computer Game Room. You will now put your welcome/program description for the user into a void function. Be sure

image text in transcribed
Add to lab 4: Lame Game Computer Game Room. You will now put your welcome/program description for the user into a void function. Be sure to update your code to include the new features, if any Make any necessary updates to your program after reviewing the feedback from your previous lab. You will start organizing your code into functions. You will start by moving the central part of your code into a main function, if you have not already. This function will mainly have a loop that executes until the user enters the option to You will create a value-returning function with all the code that displays the menu and makes sure the user entered a valid choice. This new menu function will not take any input, but will pass back to the calling function a valid menu choice. (Remember that program input and output is not the same thing as function input and output. Function input is what is passed in on the parameter list, NOT reading data from the keyboard. Function output is anything returned to the calling function whether it is on the parameter list or in a refurn statement.) You will move the code to display the face value of a card into a new function called display face_value. This function will take as input one numeric card value. The function will then display the one word face value of the card passed in. This function will not pass back anything to the calling function. Pay attention to the words in bold and follow the directions. I have reasons for having you do this a specific Adding a new option to your menu (3. Deal Hand). you will now have the following options: 1. Make Change 2. High Card 3. Deal Hand 4. Quit Make Change and High Card will now be moved into their own functions. So, if the user enters option 1, your main will call make-change0 If the user enters option 2. your main will call high cardo. When chosen, option 3 will call the deal hand function. This function will generate, or will declare 5 new variables, one for each card in a 5-card hand. Once all 5 cards have been dealt, display the face value for each of the cards in the hand. You will use your new display_face value function to do this. You will have to call it once for each card. Again, I have reasons for having you do this a specific way, so be sure you follow the "deal" an entire 5-card hand. You Only have the functions as directed in the assignment

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

Step: 3

blur-text-image

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

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions

Question

(3) Z (U + 2124), which is the set of all integers;

Answered: 1 week ago