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 trialJoel holsinger
2,345 PointsWorks perfectly inside Workspace. Getting error when I submit?
The code I typed works perfectly inside workspace but the code challenge keeps rejecting it. What should I do differently?
vowels = ('a', 'e', 'i', 'o', 'u')
def disemvowel(word):
word.lower()
new_word = ''
for letter in word:
if letter not in vowels:
new_word += letter
return new_word
1 Answer
Steven Parker
231,269 PointsIt's difficult to completely test a challenge in another environment, because you have to create test cases that cover all the conditions that the challenge might use.
For example, the challenge expects the function to remove both upper-case and lower-case vowels. Try testing your function with a word like "TESTING". The result should be "TSTNG" (vowels removed, no other letters changed).