Multiplication
We can think of multiplication, (M x N) as counting the number of items in an M by N array (M items in each row, N rows):
The example above shows the array for 3 x 4, four rows with three Xs in a row. Of course, the students would never
use Xs.
To create the array, students were introduced to the process of embedding one loop inside another. For M x N:
Do N times
Do M times
Display an item
They first displayed their character M times, learning how to "stamp" their character on the screen. They also gained practiced in moving their character in the X direction. They then were shown how to move "up" in the Y direction and return to the left edge of the screen. This last step required moving to a specific (X, Y) location. The trick, they learned, was to make sure the X value was the same as the one used to originally position the character.
The students solved a compound problem by breaking it into smaller, solvable, problems.
How much did the students take away from this exercise? We will see as they continue with their programming. However, when we think of scaffolding, the students were guided through a real solution, with steps chunked to fit their abilitities. I suspect that the next embedded loop problem will still require guidence, but I am willing to wager that after one or two more programs, the students will grasp the process.
Here are two students programs. They have been selected because these students have not yet been published on this site. We want to recognize all the talent, but to allow you to review the work in one lifetime, we will share the creations a few at a time.
Alia
Troy
|