A bug in codecademy system

The orginal code from system:

print ‘Welcome to the Pig Latin Translator!’

Start coding here!

original = raw_input(“Enter a word:”)
if len(original) > 0 and original.isalpha():
print original
else:
print “empty”

After “Run”:

Welcome to the Pig Latin Translator!
Enter a word:Traceback (most recent call last):
File “python”, line 4, in
ExecTimeoutException: Program took too long to terminate.

The “Error explanation”:

It seems like you have encountered an ExecTimeoutException error, indicating that the program took too long to terminate. This error can occur due to external factors like server load or network issues. However, your code looks fine without any syntax errors.

To address this issue, you can try running your code again after refreshing the page or restarting the Python environment. This error is usually transient and not related to your code specifically.

Here is an example of your code with no changes needed:

print ‘Welcome to the Pig Latin Translator!’

Start coding here!

original = raw_input(“Enter a word:”)
if len(original) > 0 and original.isalpha():
print original
else:
print “empty”

The example code is exactly the same with the original one.
I’d been stuck with this for many times in a line. For many times it told me that it’s the Python2 and Python3 version issues, but the error still occur after I change the code to Python 3 version.

Is there anyone has the same trouble or just me?

2 Likes

You haven’t provided a link to the exercise, but based on the code, you are supposed to enter some input after hitting the “Run” button.

I suggest:

  • Click the “Run” button.

  • Then, make sure you use mouse click to highlight the terminal (the window on the right). This will shift the focus from the editor to the terminal. Most likely, a blinking cursor will appear showing that the terminal is in focus.

  • Type something in and then press Enter. If you take too long to focus on the terminal and/or to type the input, you will get a timeout exception indicating you too took long. The system doesn’t know why your program is taking too long to finish, so as a precaution it terminates your program after some time.

Help Article:

Hi Myrtle,

It works, thank you very much.

Best regards

Steve