runtime error
An error that happens while a program is running, such as dividing by zero or using an undefined name, raised as an exception.
In more detail
The syntax was fine, so the program started and ran until the bad line executed; code before it has already run. Python reports it with a traceback. A logic error is different again: the program runs without complaint but gives the wrong answer.
Related terms
- exception — An error object a program raises to stop normal flow and report that something went wrong.
- traceback — The report Python prints when an unhandled exception stops a program, listing the chain of calls that led there and ending with the error.
- syntax error — A mistake in the form of code, such as an unclosed bracket or an if without its matching end, that the language cannot understand and so will not run.
- logic error — A mistake that lets a program run without any error message but makes it produce the wrong result.
Taught in
- Playing Computer — Hands-on Python: Complete Video Course & Book
- String Indices — Hands-on Python: Complete Video Course & Book
- CGI: Dynamic Web Pages — Hands-on Python: Complete Video Course & Book
- Chapter Four In One Sitting — Hands-on Python: Complete Video Course & Book