CRD-2.I.1 A logic error is a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly.
CRD-2.I.2 A syntax error is a mistake in the program where the rules of the programming language are not followed.
CRD-2.I.3 A run-time error is a mistake in the program that occurs during the execution of a program. Programming languages define their own run-time errors.
CRD-2.I.4 An overflow error is an error that occurs when a computer attempts to handle a number that is outside of the defined range of values.
CRD-2.I.5 The following are effective ways to find and correct errors:
test cases
hand tracing
visualizations
debuggers
adding extra output statement(s)
The objective for this lesson is to recognize different types of errors and apply printing output statements to to find and correct logic errors.
Activity 7.4. (55 minutes)
Facilitate students’ discussion on the most downloaded song ringtone of 2015 and errors with downloads (PowerPoint slide 2).
Facilitate PowerPoint slides on printing different data types to the console (PowerPoint slide 3, Archived EarSketch Chapter 15.1 (Debugging Logic)).
· Present PowerPoint and video explaining how to use printing to the console to debug errors. (PowerPoint slide 4-6, Archived EarSketch Chapter 15.2 (Printing to the Console)).
Assign students the Debugging Mini Task.