Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Striped Words by a.a.v.worker
def checkio(text):
VOWS = set("AEIOUY")
CONS = set("BCDFGHJKLMNPQRSTVWXZ")
text = text.upper()
counter = 0
for chr in text:
if chr in '.,!?': text = text.replace(chr,' ')
for word in text.split():
if len(word) < 2: continue
if set(word[::2]).issubset(VOWS) and set(word[1::2]).issubset(CONS) or \
set(word[1::2]).issubset(VOWS) and set(word[::2]).issubset(CONS):
counter += 1
return counter
Aug. 18, 2015
Comments: