Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
qria's shorter solution in Creative category for Striped Words by nickie
import re
checkio=lambda t:sum(len(set((c in 'AEIOUY')==i%2
for i,c in enumerate(w)))==1 for w in re.findall(r"\b[A-Z]{2,}\b",t.upper()))
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
assert checkio("My name is ...") == 3, "All words are striped"
assert checkio("Hello world") == 0, "No one"
assert checkio("A quantity of striped words.") == 1, "Only of"
assert checkio("Dog,cat,mouse,bird.Human.") == 3, "Dog, cat and human"
Nov. 4, 2013