Check yourself!


#1

Just need a little clarification with this lesson.

How come the result came out as empty even though I typed "derp" when prompted? After typing anything after "Enter a word:" it automatically brings me to a new line and only then does anything I input get registered. I'm a little confused to what's going on here.


#2

Hello, @ornellasd!
The raw_input() function is used to prompt out a message so the enter can inform a value for you.
In this case, you should've done:

original = raw_input("Enter a word:")

#3

i cant find the problem. Please help

print 'Welcome to the Pig Latin Translator!'

Start coding here!

raw_input("Enter a word:")
original = raw_input("Enter a word:")

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

CONSOLE:

File "python", line 9
else :
^
SyntaxError: invalid syntax


#4

@devsurfer38088: I believe you're not supposed to leave a space between else and :.
Also, make sure it's indented!


#5

not helpful


#6

please help me out


#7

@devsurfer38088: It's your indentation.
Just need to fix that and the code will work.


#8

ya its working now , thanks alot :slightly_smiling:


#9

No problem, Atishay! Glad to help!


#10

please help QAQ
no matter what i did or how many times i refresh the page, this error just keep happening. Afterward i just skip this part, but if i go back to the homepage and click the "continue", it still show this page.

please help me, thanks ><


#11

@weipeihsuan: If even refreshing the page and executing again it doesn't work , try another browser.


#12

Wow,it truly help.thank you so much!


#13

No problem, Weipeihsuan! Glad to help!


#14

I'm sure there's nothing wrong with my code, but codecademy won't load the next lesson. It won't even tell me that my code is wrong, It just has that little turning wheel going around and around.