FAQ: PygLatin - Word Up

I wrote the same code as given in answer. Why does it not accept my answer correct? From last two steps I am forced to view solution. When I check the solution, it is the same what I write.

Can we see the code that didn’t pass? Do you still have it?

Once I ran my code, I’m asked to “Enter a word” in the interpreter box, what should I type in there?

Whatever you want. Its an opportunity for you to test your program.

I’ve completed the instructions given for this exercise but it is still asking me to “create a variable called word”, even though I already have, every time I type into the console to test my program. Does anyone have an idea why this happens?

Without seeing the code you wrote, no. Sometimes raw_input causes hangs in the browser, you can try refreshing etc. to clear it up. If that doesn’t work you can submit the issue to the forum but if submitting code please try to format it with backquotes/accent grave-
for example…
` ` `
x = 3
` ` `

x = 3

More formatting info-


This is the piece of code that I wrote for the exercise. It looks correct to me but it still gives me the same error message as before. I tried to refresh the page but it did not change anything. What did I do wrong?

1 Like

Please try to format code before submitting it the forums. Screenshots are better than nothing but not as easy to check.

I tried this on my own interpreter and it ran fine. Went through the lessons online up to this point and then weirdly got stuck at the exact same point as you did :laughing: Kept getting code that got stuck at the prompt and a hint that ‘word’ was not defined. A couple of print statements suggests the hang acutally occurred immediately after raw_input was used.

Resetting the lesson didn’t work, neither did using the solution. I had to clear our my browsers cache in order to get through the lesson. Somehow the old instances weren’t getting cleaned up and somewhere, somehow raw_input was never dealt with. I’d look into clearing out your browsers cache unless anyone else has a bright idea to kill off old instances (which I what I assume is happening; reminds me of helping out in a class on C when students had to use scanf and you pop over to help and they have nigh on a hundred prgorams running at once).

1 Like

Huh, that’s pretty weird. I’ll try and clear my browser cache to see if it gets up and running again, thank you so much for trying this hard to get it to work, it’s pretty awesome of you!


I’m using this code and it tells me ‘Traceback (most recent call last):
File “python”, line 3, in
ExecTimeoutException: Program took too long to terminate.’

This is the code.

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
  word = original.lower()
  first = word[0]
    print 'empty'

what if you run your code on repl.it? Does that work?

It doesn’t. I went on ‘view solution’ and ran that code on repl.it. That doesn’t work either.

Also times out? Or what? Did you run the right python version? Or do you get a different error?

Are you having problem with using the prompt in the lesson? Or on repl? Or both?

Turns out it was the wrong Python version on repl.it. I ran it with the correct version, and it works.
I think it’s something with the lesson, it’s happening with every lesson in PygLatin.

yea, seems to be

if len(original) > 0 and original.isalpha():
  print original.lower()
  word = original.lower
  first = word[0]
  print 'empty'

When I try first = word[0] , there is a bug that says: “Did you create a variable called first?”
Do you know how to fix this bug? Thanks!

I’d suggest printing out the intermediate names in that chunk of code so you know exactly what’s going on at each step (is your logic being correctly applied to the code).

Hi> i have tried several times and even had to ask for the solution. it gets to the point where i input my word into the console but then after it leaves an error message even though the code is correct. i know this because it is codecademy’s solution. this is the error message i keep getting;
Traceback (most recent call last):
File “python”, line 3, in
ExecTimeoutException: Program took too long to terminate.

exactly the same problem i have.

Welcome to the forums!

Did you enter a value into the console after clicking “Run”? Alternatively, you can check out this topic or this one for possible solutions.