A mistake in an algorithm or program that causes it to behave incorrectly or unexpectedly, even though the code may be syntactically valid.
Topic 1.4: 1.4 Identifying and Correcting Errors
logic error cheat sheet for homework