Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialHarihar Kandula
6,486 PointsThe code for disemvowel appears to be correct. But, not sure why it is not letting me through.
def disemvowel(word):
newstr = word
my_vowels = ['a', 'e', 'i', 'o', 'u']
for letter in word.lower():
if letter in my_vowels:
newstr = newstr.replace(letter, "")
return newstr
def disemvowel(word):
newstr = word
my_vowels = ['a', 'e', 'i', 'o', 'u']
for letter in word.lower():
if letter in my_vowels:
newstr = newstr.replace(letter, "")
return newstr
1 Answer
Steven Parker
231,236 PointsThe function needs to remove both upper and lower case vowels, but this code appears to only remove those in lower case.
Greg Kaleka
39,021 PointsGreg Kaleka
39,021 PointsThis might be giving away too much, but here's an extra hint: you're checking lowercase and uppercase vowels, but you're only replacing lowercase vowels.
Harihar Kandula
6,486 PointsHarihar Kandula
6,486 PointsGot it worked! Thanks Steven!
Steven Parker
231,236 PointsSteven Parker
231,236 PointsHarihar Kandula — Glad to help. You can mark the question solved by choosing a "best answer".
And happy coding!