4. Check Yourself, need help


#1



print 'Welcome to the Pig Latin Translator!'

original = raw_input('whats your name?')

if len(original) > 0:

print original:

else:
print "empty"

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


I can't figure out what is wrong, here is the error message

File "python", line 8
print original:
^
IndentationError: expected an indented block

Also get a box below saying that I may of accidentally deleted the variable called original

I am expecting this to allow me to input a name and if the names length is above 0 characters, it should print the name, if not then it should print "empty"



#2

So this is really where we're going, eh? Please stick to the script. Thanks.


#3

That's fixed, I was wondering what I could do to fix the code


#4

Python is pointing ^ in the error message. The exception is before that point. Look behind for the error.


#5

ok thanks, I figured out the issue and resolved it


#6

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