Words Score

  • + 3 comments

    short and 'simple'

    def score_words(words):
        return sum(sum(char in 'aeiouy' for char in word) % 2 or 2 for word in words)