Check yourself...some more


#1


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

My output is incorrect. When I enter a name with letters it results in the else print statement, not the if print statement. Also, In the first "Check yourself" practice I tried to get the output for the elif, but ended up with the if statement.

Right now, I just want the correct output for what the person typed.

print ' Welcome to the Pig Latin Translator! '

# Start coding here!
raw_input("name:")
original = "raw_input()"

if len(original) > 0 and original.isalpha() : 
     print "raw_input()"
elif len(original) == 0: 
     print "type in a name, please"
else: 
      print "try again, enter a name with letters"

#2

Hi these line

raw_input("name:")
original = "raw_input()"

chnage it to

original = raw_input("name:")

#3

Hi, thank you for replying but the print didn't correspond to the answer still. I typed in a name but it came up as an error.

The error was:
"Oops, try again. It looks like your code does not print original ("Trinity") when original is only made up of alphabetical characters."


#4

Can you post your new code?


#5

Instead of printing a string you should print original


#6

help me please

this error is showing

File "python", line 5, in
AttributeError: 'unicode' object has no attribute 'isapha'

and the code I typed is

print 'Welcome to the Pig Latin Translator!'

Start coding here!

original=raw_input("enter a word and then hit enter.")
if (len(original)>0) and original.isaplpha():
print '%s' %(original)
else:
print 'type something'


#7

Hi this line

if (len(original)>0) and original.isaplpha():

you wrote isaplpha() instead of isalpha()


#8

Hello, I apologize for seeing this 3 days after. Here's the code I have right now:

print ' Welcome to the Pig Latin Translator! '

Start coding here!

original = raw_input("name:")

if len(original) > 0 and original.isalpha():
print raw_input()
elif len(original) == 0:
print "type in a name, please"
else:
print "try again, enter a name with letters"


#9

Hi don't worry....
This line

if len(original) > 0 and original.isalpha():
    print raw_input()

instead of print raw_input() you should print original


#10

It worked! Thank you so much.