Check yourself some more


#1

Use and to add a second condition to your if statement. In addition to your existing check that the string contains characters, you should also use .isalpha() to make sure that it only contains letters.

Don't forget to keep the colon at the end of the if statement!

print 'Welcome to the Pig Latin Translator!'

original = raw_input("What's your name?")
if len(original) > 0: and original.isalpha():
print original
else:
print "empty"

what am i missing in this one?


#2

this line:

if len(original) > 0: and original.isalpha():

the colon you had after len(original) > 0 should have moved to the end. You added a new one add the end, remove the colon after checking for the length


#3

Thank you so much. It worked.