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 ..."