PygLatin 4: Check Yourself!


#1


https://www.codecademy.com/courses/python-beginner-2W5v7/0/4?curriculum_id=4f89dab3d788890003000096#
What am I doing wrong?

original = raw_input("Enter a word:")
if:
    len(original) > 0
    print original
else:
    print "empty"


#2

original = raw_input("Enter a word:')

a quotation mark and a apostrophe don't match


#3

fixed. that was just a typo when i copied it over.


#4

this should be one line:

if:
    len(original) > 0

len(original) > 0 is a condition


#6

I was running the code and when I input a value, I get the error: "Oops, try again. Oops! Did you accidentally delete the variable called original?"
Could you please help me here?

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
def run():
    original = raw_input("Enter a word:")
    if len(original) > 0:
        print original
    else:
        print "empty"
        run()

run()

#7

adding more code (like run function) can cause errors


#9

Hi I'm stuck on this part as well. Here is my code

print 'Welcome to the Pig Latin Translator!'

original = raw_input("Enter a Word:")
    if len(original) > 0:
        print original
    else:
        print "empty"

What am i doing wrong?

Thanks


#10

Ah it didnt like my indents


#11

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