What is wrong?


#1

I dont understand what is wrong?
else: gives error?


#2

impossible to say without your code, you might be missing a parenthes on the line above

could be so many things

there is a reason you where given a template which asks for certain information, making good quality topics means better and faster answers


#3

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 "

gives error


#4

why does the else line have indent? given you want an if/else both should have the same indent level (no indent in this case)


#5

Had same problem. Thanks. I would never have guessed it was indent lvl.


#6

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