Check Yourself.... Some More Pyglatin Error


#1

So I am currently stuck on this problem, but not for the conventional reasons (I think anyways).

As it currently stands this is my code for the problem set -

print 'Welcome to the Pig Latin Translator!'

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

Now when I type in the code on one account, my PC (I have two, one for my PC and one for my laptop), I receive this error -

Welcome to the Pig Latin Translator!
Traceback (most recent call last):
  File "python", line 3, in <module>
TypeError: 'str' object is not callable

However when I copy and paste the same code on my other account on my laptop it goes through and says I've done it correctly. I've checked formatting and seeing if I missed some small item but it looks as if I haven't, can anyone point my in the right direction or let me know what I'm doing wrong?

This is the link to the exact problem
https://www.codecademy.com/courses/python-beginner-2W5v7/0/5?curriculum_id=4f89dab3d788890003000096#


#2

Your code is correct. But why do you use two raw_input calls?


On the account where it does not work you should try to:

  1. copy your code;
  2. click reset code;
  3. click save & submit code;
  4. paste your code back into the editor;
  5. click save & submit code again.

#3

Awesome thank you! It got to the point where I wasn't sure if I was missing something so I ended up adding that extra line accidentally. I'll make sure to test that now and see if it works!


#4

Looks as if its not going through, I'll skip over that particular set!


#5

Hm, that's truly strange. Sorry that I can not help. Codecademy glitch.


#6

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