Question: This question is for MATLAB users: Write a script echoletters that will prompt the user for letters of the alphabet and echo-print them until the

This question is for MATLAB users:

Write a script echoletters that will prompt the user for letters of the alphabet and echo-print them until the user enters a character that is not a letter of the alphabet. At that point, the script will print the nonletter, and a count of how many letters were entered. Here are examples of running this script:

>> echoletters

Enter a letter: T

Thanks, you entered a T

Enter a letter: a

Thanks, you entered a a

Enter a letter: 8

8 is not a letter

You entered 2 letters

>> echoletters

Enter a letter: !

! is not a letter

You entered 0 letters

The format must be exactly as shown above.

Hint: Use isletter function to check if the input is a letter. isletter returns 1 for a character and 0 for non-character.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!