Bug
Elementary
A bug is a mistake in a program that makes it behave incorrectly.
Examples
Non-examples
Things that may be mistaken for examples.
-
In floating point arithmetic, $0.1 + 0.2$ evaluates to $0.30000000000000004$ due to rounding errors.
High school
The rounding in $0.1 + 0.2$ is not a bug unless the code assumes that the result is exactly $0.3$.
-
In Python, opening a file that does not exist raises
FileNotFoundErrorHigh schoolTheFileNotFoundErroris not a bug, because a missing file is an expected condition, not a mistake in the code.