Help me to understand!

I got a problem with that exercise:

pyg = ‘ay’

original = raw_input(‘Enter a word:’)

if len(original) > 0 and original.isalpha():

word = original.lower()

first = word[0]

new_word = word + first + pyg

new_word = new_word[1:len(new_word)]


print 'empty'

This code is correct but the local program say that:

Traceback (most recent call last):
File “python”, line 3, in
ExecTimeoutException: Program took too long to terminate.

What is wrong with that???

Did you remember to click on the console panel and type in your word?


Yes, for sure. Each Time I cliked to run the code.

I believe he meant after running the code did you then type in a word in the console itself? raw_input will wait almost indefintiely for input which can be interpreted as a hung program which is then terminated with that timeout error after a set period.

If it’s not that then occasionally folks have problems with raw_input hanging on in the background (especially if the code was run multiple times). I’d consider refreshing the page, resetting that lesson or perhaps going as far as clearing your browser cache to try and clear it up unless someone has a cleaner method.