Your first error, on purpose
What the machine does when it cannot follow you, and why that is good news.
Sooner or later, and probably sooner, you will hand the computer something it cannot follow. A bracket will be missing, or a word will be misspelled. When that happens the computer stops where it is, carries out nothing further, and writes a description of what went wrong and roughly where.
That description is called an error message, and meeting one early is genuinely good news. The alternative, a program that runs happily and quietly does the wrong thing, is much worse and much harder to find. An error is the machine telling you exactly where it lost the thread.
So the sensible thing is to break something deliberately and look at the result while there is nothing at stake. Run the next snippet before you fix it.
Run it as it is and read the message that comes back. Then add the missing closing bracket at the end of the line and run it again.
What comes back is a few lines with a shape something like this.
line 1
print("Hello."
^
SyntaxError: '(' was never closedRead it from the bottom. The last line is the summary and by far the most useful part: SyntaxError is the kind of problem, and '(' was never closed is the description. Above it are the line number, so you know where to look, a copy of the offending line, and a small arrow pointing at the character Python was staring at when it gave up.
For some errors there is also a first line reading Traceback (most recent call last):. A traceback is the trail of where Python was when it stopped, and for a one-line program there is nothing in the trail worth reading. Start at the bottom.
Here is a second one, of a completely different kind. This time the line is put together correctly, with matching brackets and nothing missing. It just uses a word Python has never been told about.
Run it and read the last line of the message. Then put quotation marks around the word, so it becomes a piece of text, and run it again.
NameError: name 'nickname' is not defined means: you used a name, and I have never heard of it. Python knows a few dozen words of its own, print among them, and nothing else until you tell it. Without quotation marks, nickname looks like a name for something rather than a piece of text, so Python goes looking for it and comes back empty handed.
A program is fifty lines long and the message says line 12. Which lines can you stop worrying about for now?
Lines 13 to 50, because they never ran. Python stopped at line 12. That does not prove the mistake is on line 12, since the trouble may have started a line or two earlier, but everything after it is out of the picture until this one is fixed.