Pyg Latin 4 Check yourself help


#1

I keep getting a synax error but I don't understand why, here is my code:

print 'Welcome to the Pig Latin Translator!'

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

The console says:
File "python", line 6
SyntaxError: 'return' outside function


#2

It's simple. In Python if you have condition like an if-statement or a forloop. You have to start the block with a ":" and everything which has to be in the if block must be tabed in.

so here an example

 if 5**2 == 25:
   print "It\'s True! "
 else:
  print "It\'s False!"

#3

Since we can only write return in a function, this would suggest one that is not expected, or it is written out of scope (wrong indent or none).

return True

Did you mean to write,

print original

?