Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Write a program that reads in words entered by the user and checks whether: • the word has at least...

Write a program that reads in words entered by the user and checks whether: • the word has at least 8 characters, • starts with a consonant, • has alternating consonants and vowels, and • the consonants are in decreasing alphabetical order. The program should loop reading additional words until the user enters an empty string. Note that you can check letters for alphabetical order using <.

Your program should work for words entered upper or lower case, and must use a function is_alternating(word) that returns True if the word has the above pattern, and False otherwise. You are welcome to use additional functions if you would like. Hint. Remember to write a loop that goes through each letter and check for the necessary conditions. Using indexing is important here as you need to compare letters in different positions.

Here is an example run of this program:

Enter a word: zayexiwo

The word 'zayexiwo' is alternating

Enter a word: zaYexiWov

The word 'zaYexiWov' is alternating

Enter a word: zaaexiWov

The word 'zaaexiWov' is not alternating

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question