You are going to make errors.
Your tutor is likely to make errors while typing too.
Don’t worry about errors. Just learn to fix them.
When an error happens there will be some text the helps you find what went wrong.
Here we can see a Type Error happening. The code tried to concatenate an integer onto a string and the print function was not happy about it. But notice how it tries to help you. First it tells you the line that caused the problem, in this case line 2. And then it explains what the issue is. In this case it says:
can only concatenate str (not "int") to str
In IDLE depending on the version it might say:
must be str, not int
But both are telling you what went wrong.
In this image we see a syntax error.
unexpected EOF while parsing
EOF means End Of File. This means python reached the end of the file but was still expecting something. If you look closely you can see that there are two opening brackets on the print line, but only one closing one. The end of the file was reached and python was still waiting for that second closing bracket.
This error is harder to find as the line number shown is just the end of the file. Python doesn’t know where you missed the bracket.