Check yourself...some more 2.5


#1




When I go through the prompts with responses with just alpha characters, as well as some with numbers, the code works either way. Therefore, it must be incorrect since the goal is to not allow responses with non alpha characters to work, correct?


print 'Welcome to the Pig Latin Translator!'


raw_input("Enter a word:")
original = raw_input ('Hello')
if len(original) and original.isalpha() > 0:
    print original
else:
    print "empty"


#2

The greater than 0 part should be with len(). .isalpha() returns a boolean.


#3

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