why is my code throwing an error message, and why are some but not all vowels being removed?


You do the replacement for all characters because your condition always evaluates to a truthy value. Only "a" is compared to i, and if that's false then the expression evaluates to "A" which is truthy.
The only character that will have been replaced in the result is the last character, because you keep resetting a single character from the original text and the last character is the last one that you do this for.


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