Vowel Cover X34889


Statement
 

pdf   zip

We say that a string ss is covered by vowels (it’s vowel_covered) if ss is longer than 4, its initial and final positions are uppercase vowels and its second and last but one positions are lowercase vowels. Thus AiaI is not covered by vowels since its length is 4, but AureA is covered by vowels.

Implement the function @is_vowel_covered(s)@ which returns TrueTrue if a given string ss is vowel covered and FalseFalse otherwise.

Sample session

Sample session
>>> is_vowel_covered("AaaaA")
True
>>> is_vowel_covered("AaaA")
False
>>> is_vowel_covered("AeioUAeioU")
True
>>> is_vowel_covered("aAppAlAa")
False
>>> is_vowel_covered("AaaaaazZ")
False
Information
Author
InfBesos
Language
English
Other languages
Catalan Spanish
Official solutions
Python
User solutions
Python