Anti-vowel wont loop


#1

text = "Hey look Words"
def anti_vowel(text):
vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
word = ""
for n in text:
if n not in vowels:
word = word + n
return word

print anti_vowel(text)

just prints out H


#2

text = "Hey look Words"
def anti_vowel(text):
    vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
    word = ""
    for n in text:
        if n not in vowels:
            word = word + n
        return word
            
print anti_vowel(text)

#3

Fix the indentation of your return statement


#4

Airplane whizzing over head


#5

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