Check Yourself


#1


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

Oops, try again. The original variable ("hello") had more than 0 characters but did not get printed.

Should have printed "hello"


print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:")

empty_string = ""

if len(empty_string) > 0:
    print original
else: 
    print "empty"


#2

Hi instead of empty_string you should use original since its where you saved the raw_input()


#3

With things like this you can simply test the truthiness of the variable because any thing empty in python is considered False.

So just doing,

a = 'String'
if a:
    print(a)
# OUTPUT: String

#4

That did it!

The lesson loads up "len(empty_string)" by default, so I just didn't notice that. Appreciate the help!