Question: - + D Ah @ Write a MATLAB script that prompts the user to enter a word containing a specific number of letters. That specific
- + D Ah @ Write a MATLAB script that prompts the user to enter a word containing a specific number of letters. That specific number of letters should be a randomly generated Integer between 3 and 10 (Inclusive). If the user enters a word with the wrong number of letters, print an error message, and give the user a total of three chances to enter a word with the correct number of letters. Design your program to match the format of the sample output provided below (although your random numbers and user input will be different). >> hw5_914 Enter a 7-letter word.-> Kitchen Correct kitchen has 7 letter(s). >> hw5_914 Enter a 10-letter word.-> interest Not 10 letters. Please try again. Enter a 10-letter word.-> interests Not 10 letters. Please try again. Enter a 10-letter word.->interested Correct, interested has 10 letter(s). >> hw5_914 Enter a 4-letter word.-> computer Not 4 letters. Please try again. Enter a 4-letter word.-> computers Not 4 letters. Please try again. Enter a 4-letter word.-> computation Not 4 letters. Thank you for trying
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
