Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi I would like help with this Matlab problem. Thank you. Homework Problem -The Hi-Low Game Remember when you were young and played the hi-low
Hi I would like help with this Matlab problem. Thank you.
Homework Problem -The Hi-Low Game Remember when you were young and played the hi-low game with someone. I'm thinking of a number from I to 100. Try to guess what the mumber is and I will tell yoa higher or lower until you get ir?" The first part of this assignment is to develop a flowchart. See page 31 for a start. Then, use the logic of this flowchart and write a Matlab program which randomly selects a number between 1 and 100. The player running the program should be informed that the number is between 1 and 100 and then asked to guess the number. After cach of the player's guesses, the program says something like: That mamber is way too high', or "way too low", or "soo low or "too high or "close, but a little low" or "close, but a tad bit high or You found the number!!! Do you want to play again?? That's seven different messages In addition to getting your program to run, points will be credited or deducted for the following: The player must have the option to play as many times as he/she wants, withos8 restarting the program (A play is defined as a series of guesses ending with the right guess). One of seven different notifications must be displayed after each guess depending on how close the player's guess was to the actual number. Sce the above paragraph for our, rather unoriginal, suggestions (be creative if you have the time). It is not necessary that each of the seven be shown in each play. However, among the three plays, each statement must occur at least once. HINT: Draw a number line, label the answer, label where your boundaries are, label the guess. From this, you will see what the logic must be. The actual number mast be picked randomly by the computer and based ca the PC clock. The number must be between 1 and 100 and must be different for each play. [NOTE: 1 to 100 0 to 100) You are expected to use semi-colons as necessary so that no extraneous use fprintf andor disp to print your outpat variables and values are printed. In other words, HINT: while devcloping your program, it is recommended that you will know what to "guess" when ehecking if your logic works so that Use \ n, \t, and blank spaces as needed for a nice output appearance All words must be spelled correctly and all statements must be grammatically corect You can add anything else to the program you wish and extra credit will be awarded based on is value and sophistication. Examples: counting the number of guesses, including a timer, having a user-supplied range for the mumber, an instructions page, etc Hand in your low chart, program and output showing at least three plays. If you have anything to be considered in the extra credit category, present evidence of it in the plays, and highlight it or otherwise note it for the graders. Programs with no catput will receive zeo sredit Name and section are to be computer generated Point Value: Reading for next time a on program and output. Font must be Courier New Date due: Date assigned: 60- Homework Problem -The Hi-Low Game Remember when you were young and played the hi-low game with someone. I'm thinking of a number from I to 100. Try to guess what the mumber is and I will tell yoa higher or lower until you get ir?" The first part of this assignment is to develop a flowchart. See page 31 for a start. Then, use the logic of this flowchart and write a Matlab program which randomly selects a number between 1 and 100. The player running the program should be informed that the number is between 1 and 100 and then asked to guess the number. After cach of the player's guesses, the program says something like: That mamber is way too high', or "way too low", or "soo low or "too high or "close, but a little low" or "close, but a tad bit high or You found the number!!! Do you want to play again?? That's seven different messages In addition to getting your program to run, points will be credited or deducted for the following: The player must have the option to play as many times as he/she wants, withos8 restarting the program (A play is defined as a series of guesses ending with the right guess). One of seven different notifications must be displayed after each guess depending on how close the player's guess was to the actual number. Sce the above paragraph for our, rather unoriginal, suggestions (be creative if you have the time). It is not necessary that each of the seven be shown in each play. However, among the three plays, each statement must occur at least once. HINT: Draw a number line, label the answer, label where your boundaries are, label the guess. From this, you will see what the logic must be. The actual number mast be picked randomly by the computer and based ca the PC clock. The number must be between 1 and 100 and must be different for each play. [NOTE: 1 to 100 0 to 100) You are expected to use semi-colons as necessary so that no extraneous use fprintf andor disp to print your outpat variables and values are printed. In other words, HINT: while devcloping your program, it is recommended that you will know what to "guess" when ehecking if your logic works so that Use \ n, \t, and blank spaces as needed for a nice output appearance All words must be spelled correctly and all statements must be grammatically corect You can add anything else to the program you wish and extra credit will be awarded based on is value and sophistication. Examples: counting the number of guesses, including a timer, having a user-supplied range for the mumber, an instructions page, etc Hand in your low chart, program and output showing at least three plays. If you have anything to be considered in the extra credit category, present evidence of it in the plays, and highlight it or otherwise note it for the graders. Programs with no catput will receive zeo sredit Name and section are to be computer generated Point Value: Reading for next time a on program and output. Font must be Courier New Date due: Date assigned: 60Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started