Teaching Kodables to Kindergartners (Part 2)

In a previous blog article, I talked about using Kodables to teach kindergarten students how to computer program — eventually to write JavaScript. The first lesson was based on sequence. Programmers need to tell what computers what to do in the correct order. If one of your computer program statements is not in the right order, the computer program will not produce the correct result. The students learn that by placing directional arrows in the right order so that their Fuzzball (fictional character) traverses a path and picks up coins.

The second lesson is based on conditionals. Conditionals often appear in computer programs as "if" statements.

Javascript_example
Dynamic Drive example that allows a button to toggle between opening and closing a menu

To illustrate the concept to students, they drag and drop a colored square onto the sequence to indicate:

  • if my Fuzzball comes to a square that matches the color, take the action indicated by the directional arrow

Here is the first example:

Puzzle_conditionals_start

Here is the correct solution.

Puzzle_conditionals_done

You can see that the Fuzzball will start out by moving forward and then move up when it encounters its first yellow square. The Fuzzball will move forward again and then down when it encounters the second yellow square. The journey is then completed with normal forward, up, and forward moves. Though not the shortest path, this maximizes the number of coins collected which is the object of the exercise.

Eventually, understanding how checking a condition before taking an action leads students to write correct computer programs.

Education is alive in the lab.