Stuck at check yourself


please help i've done exactly what i spouse to do
but the console keep giving this error:

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

i thought i've done it perfectly but no matter what i did this error keeps appearing

here is my code:

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Enter a word:")
original = raw_input

if len(original) > 0:
    print original
    print "empty"


you should prompt the user for input using raw_input(), and store the result in original variable. This is one line of code.

Currently, you prompt the user for input (raw_input("Enter a word:")), you don't store the result entered by the user anywhere

then on the next line, you store the function itself in original variable. So then it will throw an error that builtin_function (raw_input builtin function stored in original variable) doesn't have a length (len())


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