Karel #6: Attend to precision

What It Means

Students speak and solve mathematics with exactness and meticulousness.

Computer Programming Teaches Students to Attend to Precision

Together with Perseverance in Solving Problems (MP #1), Attending to Precision (MP #6) is the most obvious math practice where computer programming applies. Of course, the logic (math) of the algorithm must be precise, or the program will not work and the given problem will not be solved. But we do not have even go to logic – the syntax, in other words avoiding typos and being able to comply with simple formatting rules, teaches students to attend to precision.

To illustrate this, we will use the following (correct) program for Karel the Robot. This program was used to illustrate the previous MP #5:

The following program will not work due to a typo. Can you find it?

Neither will the following program, due to a mistake in formatting:

Last example – here a formatting mistake does not cause the program to be invalid, but it changes its logic completely (the program becomes an infinite loop, the robot never makes a single step forward):