Stuck on my code (Check Yourself)


#1



I created this code below:

print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter a word:")

if len(original) > 0 :
    print original
else: 
    print "emtpy"


I pressed "Save & Submit Code" button, and typed nothing but entered it.
Then the screen showed up like this:

Welcome to the Pig Latin Translator!
Enter a word:
emtpy
None

Then the error occured like this:

Oops, try again. Does your code print "empty" when len(original) is 0?

So I tried another thing.
I pressed the button again and this time I typed "124".

And then;

Welcome to the Pig Latin Translator!
Enter a word: 124
124
None

And with the message;

Way to go!

What has happened to my code?


#2

the correct output needs to be printed, you misspelled empty, so when you enter something invalid, empty isn't printed because you have a typo in it


#3

Ah, I get that now. Thanks for helping. I'm kinda stupid :no_mouth:


#4