Challenge: Letters and Words

Write a program that tells a user the number of letters in a name.

We'll cover the following

Task

Write a program that uses a prompt box to ask for a user’s name and then tells the user how many letters their name contains.

Sample input 1:

Alice

Expected output:

Hello Alice! There are 5 letters in your name

Sample input 2:

John

Expected output:

Hello John! There are 4 letters in your name

Sample input 3:

Bob

Expected output:

Hello Bob! There are 3 letters in your name

Get hands-on with 1200+ tech skills courses.