Reading a stack trace
When a program crashes, Python prints a report saying exactly which line failed and what went wrong. It looks intimidating and is actually a straight answer to your question.
Read it from the bottom up. The last line names the kind of problem and describes it — for example NameError: name 'totl' is not defined, which means you misspelt a variable. That bottom line is usually all you need.
Above it is the traceback: the chain of function calls that led to the failure, oldest at the top, most recent at the bottom. When your own code called a library that failed, this chain shows which of your lines started it.
A few you will meet constantly. NameError: you used a name that does not exist, usually a typo. TypeError: you did something to the wrong kind of value, like adding a number to text. IndexError: you asked for position 10 of a list holding 3 items. KeyError: you asked a dictionary for a label it does not have. ValueError: the kind was right but the value was not, like int("hello").
The skill to build here is simply not flinching. The error message is the most helpful thing in the room; beginners skip past it and start guessing, which turns a thirty-second fix into an hour.
Where you meet it in real softwareEvery language has this. Learning to read Python's makes reading any other one easier.