Check yourself... some more


#1



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
else:   
        print "empty"


#2

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

like,

original = raw_input("Example: ")


#3

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:


#4

That fixed it! thank you!!


#5

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