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 trialKushagra Patel
7,740 PointsEOF error Disemvowel challenge
I ran this code in local idle and it ran perfectly but here it is showing EOF? Any help pls?
def disemvowel(word):
abc=[]
lower_word=word.lower()
new_list = list(lower_word)
for iterable in lower_word:
if iterable=='a' or iterable=='e' or iterable=='i'or iterable=='o'or iterable=='u':
new_list.remove(iterable)
abc=''.join(new_list)
return abc
word_noise = input("Enter a string \n")
vowel_less_string=disemvowel(word_noise)
print(vowel_less_string)
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, Kushagra Patel ! You're doing great, but those last three lines of your code you added for testing purposes which is great! But now, you're asking for a computer at the other end to put in a string and that's not going to happen. Treehouse will call your function and send in its own string (without needing the input()
function).
Erasing the bottom three lines will get rid of the EOF error, and you will be presented with a new problem to solve Hint: the capitalization of the word should remain intact.
Hope this helps!
Kushagra Patel
7,740 PointsKushagra Patel
7,740 PointsThanks a lot for your help Jennifer.