Here is a set of sample programs. Each program is provided in two forms: source code and executable code. In order to see the program running, download the executable code and run it. The executable programs do not require you to have any compiler.
Chapter 1 is mainly concerned with introduction to syntax and sequential algorithms.
athlete performs a jumping jack and says "bye".
Chapter 2 explores the use of functions. Functions are presented before repetitions.
|Jumping Jack||jumping jack using functions|
|square||robot draws a square|
Chapter 3 deals with repetitions and introduces simple arithmetic expressions.
|speed||how fast is your computer?|
|point of sale||point of sale terminal|
Chapter 4 deals with decisions and introduces the concept of recursion.
|search maze||recursive maze exploration|
Chapter 5 deals with numeric computations. Graphics and animations are also explored in this chapter.
|planet||earth around the sun|
|stars||let there be light|