So I did this code:

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    print 'empty'

and here is the error

File "python", line 9
SyntaxError: invalid syntax


You are trying to call a method, and to do this you need a dot . not a colon :


Although everything should be right. Is it because I didn't put parentheses around

print 'empty'



No? Why would you need parenthesis?


You need to specify what value you are slicing.



So that line will look like this?:


Although the instructions say

Set new_word equal to the slice from the 1st index all the way to the end of new_word. Use [1:len(new_word)] to do this.
Is there something wrong with the instructions?:hushed::hushed:

When I just started programming in Python I was taught to use parentheses.


How do I do that?


I'm sure that's what the instructions are all about
if not enough: google. "how to slice strings" or something.
The information is very much available to you



I think I should be right because of this


I've had this problem too and I am sure if the instructions for the Codecademy Python Pyg Latin Project 10/11 is fixed, then we wouldn't need to go on the forums to answer this question anymore.


You're not being lied to. They give you a piece of code but it's not enough to copy it, it's not all there. If anything, it's good that you are getting a bit stuck on this, so that you won't pass until you know how to slice something! Now go read those instructions/look at other examples.


Also, what does it mean when I run the code, it says AttributeError: 'int' object has no attribute 'len'?


Exactly what it says. Read it as if it were English.


I tried to add int() to len(new_word) and it didn't work.


How long is 5?


One digit long, I am sure.


You can write 5 as 0b101


So how does that help me?


An integer has no length. Doesn't make sense. That's what it's telling you with that error message.


So I just insert the binary length? How do I do that? What is the 0b?