Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Three Words by stanwys
def checkio(words):
#return True or False
i= 0
j=0
g=0
is3=0
lol=True
i3=False
words.split()
while (i<(len(words.split()))) and i3==False:
#while znak != cyfra
#if tak -> inne slowo
pom=words.split()[i]
for letter in pom:
if (letter >="A" and letter <="Z") or (letter >="a" and letter <="z"):
lol=True
else:
lol=False
if lol==True:
is3=is3+1
else:
is3=0
i3=False
lol=True
if is3==3:
i3=True
i=i+1
return i3
# if 3 slowa pod rzad dobre-> ok
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
assert checkio("Hello World hello") == True, "Hello"
assert checkio("He is 123 man") == False, "123 man"
assert checkio("1 2 3 4") == False, "Digits"
assert checkio("bla bla bla bla") == True, "Bla Bla"
assert checkio("Hi") == False, "Hi"
Oct. 14, 2016