Anti_vowel


#1

This is my code, but it always returns:
Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns "None" when it should return "Hy lk Wrds!".
Can you help me? I'm stuck..

def anti_vowel(text):
    i=0
    while i<len(text):
        if text[i] not in 'aiueoAIUEO':
            print text[i]
        i+=1
anti_vowel('Hey look Words!')

#2

Consider how your function is supposed to present its result, it isn't by printing


#3

It is by returning.
Thanks


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.