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.
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.