Objectives (help all)


Familiarize the student with:
using the while loop;
finding the proper implementation of verbally defined rules;
reflecting real-life situations in computer code.
Listen to our story: a boy and his father, a computer programmer, are playing with wooden blocks. They are building a pyramid. Their pyramid is a bit weird, as it is actually a pyramid-shaped wall - it’s flat. The pyramid is stacked according to one simple principle: each lower layer contains one block more than the layer above.
The figure illustrates the rule used by the builders.