PygLatin


#1

My code still returns the alphanumerical input when it should be returning an "Empty" if there's a number in the input. What did I do wrong?
Here's my code:

print 'Welcome to the Pig Latin Translator!'

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


#2

I'm running into a similar situation except I keep returning 'empty' when I should be returning 'raw_input()'...any thought? Code academy is telling me "Way to go!" and allowing me to go on but I'm confused as to why I'm not returning "raw_input()"

print 'Welcome to the Pig Latin Translator!'

Start coding here!

name = raw_input("What noise does a duck make?!")
original = "raw_input()"

if len(original) > 0 and original.isalpha():
print original
else:
print "empty"


#4

You need to remove the unnecessary print original statement there.

You need to assign original the result of calling the raw_input method.
You are assigning original the string constant "raw_input()".

Can you both @systemjumper38058 and @sofiazw fix your errors?


#5

Thanks! I got past it yesterday, but appreciate the follow up!