Check yourself


#1



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

whenever i type a word into the simulator i get the error response "Oops, try again. The original variable ("hello") had more than 0 characters but did not get printed"

print 'Welcome to the Pig Latin Translator!'

Start coding here!

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

.

Replace this line with your code.


#2

Hi your if statement check if the lenght of original is greater than 0 so if it's it should print original inside the if statement


#3

what needs t be changed? i dont understand what you mean. Ive also submitted it with this and received the same response

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


#4

your code should be like that

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

#5

so no "" around original after print?


#6

No, because "" makes it into a string instead of accessing the variable.


#7

I think you are not understanding principle. Your original variable is storing value your input into console, if you want to print what you typed, you need to print original since it has the value you type into console

Type "hello", "hello" is stored to original variable, in order to print "hello" you need to print variable that holds that value in this case original.


#8

Thanks yall, i believe i understand now


#9

Pls, help me with that error


#10

Hi remove the indent to your if and else statement