Is my console broken or is this wrong


#1


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


It's giving me a syntax error

Giving me error for the close parentheses and close bracket ")]" in line 9 below

pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
word=original.lower()
first=word[0]
new_word=[1:len(new_word)]
print new_word
else:
print 'empty'

for it to work(??? )


python

pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
word=original.lower()
first=word[0]
new_word=[1:len(new_word)]
print new_word
else:
print 'empty'


#2

You seem to be missing a piece of your code. It's the code bit that you're supposed to do in the previous lesson. It seems to have disappeared here.

You didn't define new_word before finding its length and slicing it. So it's basically not doing to be doing anything hence why the error. new_word is supposed to be defined in the previous lesson and is missing here.


#3

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