Sample programs:

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:

Chapter 1 is mainly concerned with introduction to syntax and sequential algorithms.

Jumping Jack

athlete performs a jumping jack and says "bye".

source

executable

Chapter 2:

Chapter 2 explores the use of functions. Functions are presented before repetitions.

Jumping Jack jumping jack using functions

source

executable

square robot draws a square

source

executable

Chapter 3:

Chapter 3 deals with repetitions and introduces simple arithmetic expressions.

speed how fast is your computer?

source

executable

point of sale point of sale terminal

source

executable

Chapter 4:

Chapter 4 deals with decisions and introduces the concept of recursion.

search maze recursive maze exploration

source

executable

Chapter 5:

Chapter 5 deals with numeric computations. Graphics and animations are also explored in this chapter.

planet earth around the sun

source

executable

stars let there be light

source

executable