Code error , please help


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

print 'Welcome to the Pig Latin Translator!'

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

if len(original)>0 :
print "original"
else : 
print "Empty"


after a if you should indent:

if condition:
   print "indention required"


Thanks, hate python because of indentations :smiley:


then i would pick another language, python is one of very few languages which relies on indention to keep track of what is part of a function, if and many more.


But the indentations are a good thing to learn. :wink:


for organizing your code yes, but in other languages the indention is less strict given it isn't needed for to determination what is part of function/if clause


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