Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Striped Words by PawlakBartosz43
VOWELS = "AEIOUY"
CONSONANTS = "BCDFGHJKLMNPQRSTVWXZ"
def slowo(x):
f = ['a', 'e', 'i', 'o', 'u', 'y']
liczba = ['1','2','3','4','5','6','7','8','9','0']
m = 0
if(len(x) <= 1):
return 0
else:
while(m < len(x) - 1):
if(x[m] in liczba or x[m+1] in liczba):
return 0
if(x[m] in f and x[m+1] in f):
return 0
else:
if(x[m] not in f and x[m+1] not in f):
return 0
m += 1
return 1
def checkio(text):
text = text.replace('.',' ')
text = text.replace(',',' ')
text = text.replace(';',' ')
text = text.replace('?',' ')
x = text.lower().split(' ')
print(x)
i = 0
liczba = 0
while(i < len(x)):
if(slowo(x[i]) == 1):
liczba += 1
i += 1
return(liczba)
Jan. 3, 2017