Check yourself... some more


It's saying my code is correct, but it isn't working the way it should... it's accepting numbers and not printing the input. How can I make it work properly?

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Enter a word:")
original = raw_input()
if len(original) > 0 and original.isalpha():
        print original
        print "empty"


These two lines are meant to be one because you are storing user input in the variable original,


original = raw_input("Example: ")


When you enter in numbers, it should just return "empty" because the numbers don't return true with .isalpha()

And instead of raw_input("Enter a word:") then originial = raw_input, just make it

As yours requires two inputs.

Hope I helped :slight_smile:


That fixed it! thank you!!


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