Check Yourself... Some More Problem


print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter a word:")

if len(original) > 0 or original.isalapha():
print original
print "empty"

Oops, try again. Did you remember to use .isalpha() in your code?

I don\t understand what\s wrong with the code..


When using OR, the first True will short-circuit the expression. Since the string has some length, the second condition is not tested. Use AND so both conditions MUST be True, and both get checked.


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