Nov-03-2018, 12:41 PM
Just to amplify LeShakal' response:
The computer doesn't have a brain and therefore doesn't 'understand' anything. It reacts to whatever program is running at the time - in this case the Python interpreter. This understands Python syntax not the vagaries of the human mind, so there is no question of it 'understanding' what you mean. When programming you are supposed to be the 'smart' one , telling the 'dumb' computer exactly what you want it to do. If it can't make sense of what you want of it it quite rightly gives up with an error message. Then it is up to you to spot your mistake and correct it. This is the art of programming.
So do as LeShakal suggests, look at line 12 and spot your mistake.
The computer doesn't have a brain and therefore doesn't 'understand' anything. It reacts to whatever program is running at the time - in this case the Python interpreter. This understands Python syntax not the vagaries of the human mind, so there is no question of it 'understanding' what you mean. When programming you are supposed to be the 'smart' one , telling the 'dumb' computer exactly what you want it to do. If it can't make sense of what you want of it it quite rightly gives up with an error message. Then it is up to you to spot your mistake and correct it. This is the art of programming.
So do as LeShakal suggests, look at line 12 and spot your mistake.