Part 1

Accept a word/phrase/sentence from the end user. Analyse the vowel and consonant content of this input reporting whether or not this input, in its entirety, comprises alternating vowels and consonants. For example, the name of a tennis player Goran Ivanesevic and the country name United Arab Emirates, each in it entirety, comprise alternating vowels and consonants. Similarly, the word rehabilitative in its entirety comprises alternating vowels and consonants.

Part 2

Accept a phrase/sentence from the end user and analyse its content, reporting the length of the longest word and the length of the shortest word. In addition, your program should report the word(s) that match the length of the longest word and the word(s) that match the length of the shortest word (duplicates are not permitted) For calculation purposes a word may comprise alphabetic characters (a.z and A.Z) and digits (0,9) only, all other symbols should be ignored.

Eg: Sit quietely doing nothing, spring comes, and the grass grows by itself. The output should show that the maximum length is 7 and the words matching this length is by. If sentence is.

if sentence is "advice is what we ask for when we already know the answer but wish we didn't" The output should show the maximum length is 7 and the word matching this length is already. In addition, the output should show that the minimum length is 2 and the words matching this length are is and we.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.