You are viewing a single comment's thread. Return to all comments →
This is what I did, I'm just starting out. What should I work on?
def is_vowel(letter): return letter in ['a', 'e', 'i', 'o', 'u', 'y'] def score_words(words): score = 0 tscore = [] num_vowels = 0 for word in words: for letter in word: if is_vowel(letter): num_vowels += 1 if num_vowels % 2 == 0: score += 2 else: score += 1 tscore.append(score) score = 0 num_vowels = 0 return sum(tscore)
Seems like cookies are disabled on this browser, please enable them to open this website
Words Score
You are viewing a single comment's thread. Return to all comments →
This is what I did, I'm just starting out. What should I work on?