Check Yourself!


#1



Help!! I'm not sure what happened and what's wrong :frowning:, I'm new to python and not really familiar with it as I just follow the guide before. But is there anything that I need to know to complete this code?

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


File "python", line 6
if len(original) > 0:
^
IndentationError: unexpected indent


print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Enter a word:")
original = raw_input
    if len(original) > 0:
        print original
        
    else:
        return False
        print  "Empty"


#2

your raw_input:

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

i don't see why it isn't one line, you can just store the result of calling raw_input into original:

original = raw_input("text shown to the user")

as for the error message, you have the if condition:

if len(original) > 0:

the line after the if condition requires indention, not the line of the if condition itself


#3

I already correct that one, but apparently, it isn't the real problem.
Here is the new one:

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:") 
  if len(original) > 0:
       print original
  else:
       print "Empty"

#4

yea, your if condition is wrongly indented, see my previous answer. The line after the if condition should be intended to indicate what is part of of the if clause, the if condition itself shouldn´t be intended.


#6

Oh.. ok now i see.. Thank You


#7