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 trialSuresh N
743 PointsEOF error in task window
The code is running fine in Workspaces, but getting EOF error in task window. Can anyone help me with why its happening. Thank you.
def disemvowel(word):
word = input("Tell me a word:")
print("The word you entered is: {} ".format(word))
word_list = list(word)
spare_list = list(word)
vowel = ("aeiouAEIOU")
for letters in word_list:
if letters in vowel:
spare_list.remove(letters)
word = "".join(spare_list)
print("The word after removing vowels looks like: {}".format(word))
return word
disemvowel("word")
1 Answer
Suresh N
743 PointsThank you Niall Williams. Now the code works fine.
Unsubscribed User
17,003 PointsUnsubscribed User
17,003 PointsFor this code challenge the word is passed into the function.
def disemvowel(word):
That means your code should be running using the variable
word
.So to pass the challenge all you need to do is delete these two lines:
Hope this helps!