Help me please


help me please

print 'Welcome to the Pig Latin Translator!'

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

else > print "empty"

File "python", line 6
if len(original)> print original:
SyntaxError: invalid syntax


Let's look at your code:

original = raw_input()

Here you attempt to assign raw_input() to the variable original. raw_input is a function which is correctly called above this piece of code. You could simply use the first line and assign to assign original.

if len(original)> print original:

The correct syntax for an if/elif/else statements is:

if this:
  do this

elif this:
  do this:

  do this

So your code should say:

if len(original) > ??:
  print original

  print "empty"


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