Anti_vowel...almost works?


Oops, try again. Your function fails on anti_vowel("Yab Gab to Trab Yab Yab Aeiouz"). It returns "Yb Gb t Trb Yb Yb Az" when it should return "Yb Gb t Trb Yb Yb z".

I get this error message and I don't understand how it can work until the last A.

def anti_vowel(text):
    for i in range (0, len(text)):
        for j in vowels:
            if text[i]==j:
        if tick==1:
    return newtext


because the A is uppercase, that is why your code is failing. So close, but you don't deal with the uppercase letters (yet)

i know you convert text to lowercase here, but i advise against it. The exercise wants uppercase constants to stay uppercase

and, you convert text to lower, but you don't store this case conversion anywhere


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