Pyglatin - Check Yourself... Some More


#1


Link:
https://www.codecademy.com/courses/python-beginner-2W5v7/0/5?curriculum_id=4f89dab3d788890003000096


Problem:
When I include text and a number I receive the following error:
Oops, try again. It looks like your code prints original ("hello1") when original includes non-alphabetical characters.


I was expecting to receive no error message...

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"

Can someone help?


#2

You have two print original(s), delete the print original right before your if statement (keep the one after your if statement)


#3

Gah! I had the same thing, only with a print name - as the previous exercise required.... was going around and around thinking .isalpha was borked.

Thank you.


#4

No problem :slight_smile: I remember asking close to the same question and another guy gave me that answer :slight_smile: So you can give me credit for my memory :slight_smile:


#5

thank you sooooooooooooooooooooooooooooooooooooooooooooooooooo much


#6

Np problem, glad to be of some assistance :slight_smile: