0

def main():

    user_input = input("Input: ")
    print(f"Output: {twttr(user_input)}")

def twttr(user_input):

    vowels = ["a", "e", "i", "o", "u"]

    for char in user_input:
        if char.lower() in vowels:
            char_index = user_input.find(char)
            user_input = user_input.replace(user_input[char_index], '')

    result = user_input
    return result

if __name__ == "__main__":
    main()

Why do I keep failing one test in PSET2 even though the result is visually correct.

The error is:

:( input of "What's your name?" yields output of "Wht's yr nm?" expected "Wht's yr nm?", not "Output: Wht's ..."

1 Answer 1

0

Maybe remove the word "Output:" from the print statement?

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .