3. Input! - Pyglatin, a bit stuck


#1

Hi, I've ended up a bit stuck on the exercise 3. Input!

I get as far as being able to input a word but it returns an error of

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

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

Code used:

print 'Welcome to the Pig Latin Translator!'

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

print original
else:
    print 'Empty'

#2

a else can only be after a if or a elif

you can store the result of this raw_input:

raw_input("Enter a word:")

into original, in one line of code, no need to get two raw_inputs


#3

Thanks! Managed to get it sorted:

print 'Welcome to the Pig Latin Translator!'

Start coding here!

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


#4

well apparently not:

original = raw_input("Enter a word:")

raw_input gives you user input which you can store in original, in one line of code


#5

Ah, well it let me through to the next screen.. may be a bug in the site.


#6