Stuck on Python: PygLatin


#1



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


File "python", line 5
var original = raw_input('Prompt')
^
SyntaxError: invalid syntax



Replace this line with your code. 
print 'Welcome to the Pig Latin Translator!'

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


#2

This isn't javascript. No need for the var in front of original.
Also, you can simply put the above raw_input with original. Instead of having two different raw_inputs.


#3

Unlike in JavaScript, when defining variables in Python you don't need the var keyword - you only put the variable name and the value.

Also, when prompting the user for input you assign raw_input or input (depending on which version of Python in use) to the variable directly.

Your code should really look like this:

original = raw_input("Enter a word:")

#4

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