Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Three Words by Bartlomiej_Szal
def isWord(word):
digits = "0123456789"
for i in range(len(word)):
if digits.find(word[i]) != -1:
return False
return True
def checkio(words):
wordCount = 0
while words != '':
words.strip()
if words.find(' ') == -1:
word = words
words = ""
else:
if words[0] == ' ':
words = words[1:]
word = words[0:words.find(' ')]
words = words[words.find(' '):]
if isWord(word):
wordCount += 1
if wordCount >= 3:
return True
else:
wordCount = 0
return False
Oct. 9, 2016
Comments: