Why my anti_vowel questions not working


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-python/lessons/practice-makes-perfect/exercises/antivowel?action=lesson_resume&link_content_target=interstitial_undefined

<In what way does your code behave incorrectly? Include ALL error messages.>
Your function fails on anti_vowel(“Hey look Words!”). It returns “None” when it should return “Hy lk Wrds!”.

<What do you expect to happen instead?>

```python
<do not remove the three backticks above>
def anti_vowel(text):
  new=""
  for char in text:
    if char not in "aeiouAEIOU":
      new= new+char
    else:
      new=new
  print new

#2

your function only prints new, it doesn’t return new

furthermore, your else clause doesn’t seem to do anything particular useful. I would just remove it


#3

Thanks.


#4

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