Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB Guess a Number project: Give a user 5 guesses to guess a random number 1) Ask the user their name and greet them by
MATLAB
Guess a Number project: Give a user 5 guesses to guess a random number 1) Ask the user their name and greet them by name. 2) Generate a random number between 1 and 30 3) Create a variable for the number of guesses, so it can be easily changed 4) In a loop a. Tell the user how many guesses are left and ask them to enter a number b. Tell the user if they have guessed too high, too low, or if they have guessed it c. If they have guessed the number, tell them that and what guess it was on..and then exit the program. 5) If the user has used up all their guesses and not ever guessed the random number, leave them a message before leaving the programStep 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