Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
newbie solution in Clear category for Striped Words by ewa_c
VOWELS = "AEIOUY"
CONSONANTS = "BCDFGHJKLMNPQRSTVWXZ"
NUMBERS = "0123456789"
LETTERS = VOWELS + CONSONANTS
SIGNS = LETTERS + NUMBERS
def checkio(text):
text = text.upper()
number=0
i = 0
while i<(len(text)-1):
if text[i] in VOWELS:
if text[i+1] in CONSONANTS:
if i+1==len(text)-1:
number+=1
i+=1
elif text[i+1] in VOWELS or text[i+1] in NUMBERS:
while text[i] in SIGNS and i<(len(text)-1):
i+=1
else:
if text[i] in LETTERS and text[i-1] in LETTERS:
number +=1
i+=1
elif text[i] in CONSONANTS:
if text[i+1] in VOWELS:
if i+1==len(text)-1:
number+=1
i+=1
elif text[i+1] in CONSONANTS or text[i+1] in NUMBERS:
while text[i] in SIGNS and i<(len(text)-1):
i+=1
else:
if text[i] in LETTERS and text[i-1] in LETTERS:
number +=1
i+=1
elif text[i] in NUMBERS:
while text[i] in SIGNS and i
Nov. 3, 2016