Anti_vowel "bcd"


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/2?curriculum_id=4f89dab3d788890003000096#


My coded returned the following error: Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns "bcdHy lk Wrds!" when it should return "Hy lk Wrds!".


I don't understand why or where the "bcd" at the front came from?


alist = []
def anti_vowel(text):
    for eachLetter in text:
        if eachLetter.upper() not in "AEIOU":
            alist.append(eachLetter)
        else:
            pass
    return "".join(alist)


#2

the exercise calls the function multiply times with different strings to verify your function works correctly.

bcd is one of the test cases

place alist = [] inside the function so its emptied every time the function is called


#4

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