Python pig latin check yourself


#1

someone please help!!!

print 'Welcome to the Pig Latin Translator!'

original = raw_input("enter a word")
if len (original) > 0
print original
else:
print"empty"

what's wrong with my code?


#2

The syntax of the if statement requires a :

print 'Welcome to the Pig Latin Translator!'

original = raw_input("enter a word")
if len (original) > 0:
    print original
else:
    print"empty"

Note the importance of indentation.


#3

i did that and my code is still incorrect


#4

What is the error message?

If the SCT is examining the actual code, it may not expect the white space,

    len ( ... )

Try, len( ... ), with no white space.


#5

A post was split to a new topic: Pig latin check yourself