Check yourself - code comes up with error and I don't know why


#1



Hello Everyone!
Can somebody please explain to me why my code does not work?
I have no idea why it does not work:

https://www.codecademy.com/courses/python-beginner-2W5v7/0/4?curriculum_id=4f89dab3d788890003000096#



You can see the very helpful error message I got!:neutral_face:


print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Type a word:")
original = raw_input
if len.original("Type a word") > 0:
    print ("Now you can play PygLatin!")
else:
    print ("Oops! It looks like you didn't type any word for the computer to process")


#2

If you zoom in to the image, you can see the error messages.


#3

raw_input is a built-in function where you give some inputs. Like you did:
raw_input("Type a word:")

But when you are writing :
original = raw_input

it's giving you an error as it has no input. and original cannot be assigned (=) to this built-in function rather it's input. So, better way to write this is:
original = raw_input("Type a word:")[this single line should do]
Now original can be assigned (=) to the input of the raw_input function.

Also you should use length this way:
len(original)

Make these few changes in your code. And see, if that helps.


#4

print 'Welcome to the Pig Latin Translator!'

Start coding here!

original = raw_input("Type any word:")
if len(original) > 0:
print ("Now you can play PygLatin!")
else:
print ("empty")