Anti_vowel


#1



Replace this line with your code.


#2

do you have a question? An error? Code so we can trace the problem?


#3

def anti_vowel(text):
    rem = " "
    code = ['a','A','e','E','I','i','o','O','u','U']
    for char in text:
        if char not in code:
            rem += char
    return rem

print(anti_vowel("Hey look Words!"))

This is my code and i got following error.

Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns " Hy lk Wrds!" when it should return "Hy lk Wrds!".


#4

there is a space in front of hy, because here:

rem = " "

you have a (unwanted) space, declare rem with a empty string


#5

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