Python error messages tell you what went wrong and where. Learn to read them. SyntaxError: You typed something Python doesn't understand.
Check for missing colons, unmatched parentheses, or typos. NameError: You used a variable that doesn't exist. Check spelling and whether you defined it. TypeError: You tried an operation on the wrong type, like adding a string to a number. ValueError: The value is wrong for the operation, like int("abc").
The error message includes a line number. Start debugging there.