Pyg Latin, second assignment


#1



Pig Latin 4. Check yourself


print 'Welcome to the Pig Latin Translator!'

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

if len(original) <0:       (this is line 7)
    print raw_input
    
else:
    print "empty"

----  After I input my name, this error appears. 
      What does the TypeError exactly mean?

Traceback (most recent call last):
  File "python", line 7, in <module>
TypeError: object of type 'builtin_function_or_method' has no len()


#2

I found it. There is a mistake from Codecademy. The first assignment says:

  1. Add an if statement that checks that len(original) is greater than zero. Don't forget the : at the end of the if statement!

So, we type len(original)
It says we have to type that.
But I deleted (original) and now it works.


#3

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