Lesson 3,. Pyg Latin. What am I doing wrong here?


#1

Here is my code

print 'Welcome to the Pig Latin Translator!'


original = raw_input("Enter a word:")
print original

I get this error message

"Traceback (most recent call last):
File "python", line 4, in
TypeError: 'str' object is not callable"


#2

Hi, @arizeto ,

Refresh the page and submit the same code again.


#3

Weird. That worked. I've noticed a similar issue with Firefox before...is it my browser?


#4

No, it is neither your browser nor your computer.

This is the error message ..

"Traceback (most recent call last):
File "python", line 4, in 
TypeError: 'str' object is not callable"

... which refers to line 4 ...

original = raw_input("Enter a word:")

The Python interpreter regarded the name raw_input on that line as having referred to a string, rather than to a function. When you tried to call the function, it raised the error.

You may have assigned a string to the name raw_input at some stage of your working on the code. Codecademy remembered that, and you needed to refresh the page in order to remove that from Codecademy's memory.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.