Hi please help!I have a computing homework due in for tomorrow and I am really confused why it doesn't work! It is very simple, I hear, and so should be no problem for you to fix, if you would be so kind The project is, that the user inputs a 4 digit decimal number and then answers a menu on how they would like it to be outputted - either a word place value or number place value. I am using strings to split the number, and have the code nearly ready, I think, however I keep getting syntax errors and am coming close to punching my computer! Here is the code:

Often times they're using an IDE which just says "syntax error" and doesn't provide more detail. If that is the case, pimaster, do note that if you run your script on the command line, Python will point to where in the file it doesn't understand your code and gets a SyntaxError. For at least one of the bits of code you had here, the error appeared on a later line than the problem occurred, when paren was missed. This is because a close paren problem is detected once it hits something that should come only after a close paren. So the problem on line 28 was indicated by an error on line 30. It'll be second nature eventually, to look on earlier lines when you see a strange SyntaxError.

Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.

I just tried to create and screenshot an example from IDLE, but it provided more data than I expected for my examples. When I tried the OP's code though, it indicates a problem at the end of line 22 when it should point to line 20 first. It's still not very helpful. Even the SyntaxError from the Python interpreter says line 21 here.

pimaster: really, that's terrible code that's prone to error and unhelpful feedback from the interpreter. Nothing good comes from escaping the newline to just put a close quote on the next line. Your first tuple can be written this way