Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
refindall solution in Clear category for Striped Words by Rudeboyz_Squad
import re
VOWELS = "AEIOUY"
CONSONANTS = "BCDFGHJKLMNPQRSTVWXZ"
def ch(w):
l = len(w)
for i in range(l-1):
if w[i] in VOWELS and w[i+1] in CONSONANTS :
pass
elif w[i] in CONSONANTS and w[i+1] in VOWELS:
pass
else : return False
return True
def checkio(text):
words = re.findall(r"\b[A-Z\']{2,}\b",text.upper())
res = 0
for i in words:
res += ch(i)
return res
April 9, 2019
Comments: