Building a building demo

In the latter part of the class, I did a live demo to explore greater use of nested loops. In particular, I tried to draw a high-rise building with many floors, and each floor having many windows.  Rather than release the precise code done in class, I've taken some time after class to clean it up a bit, and to generalize it to be able to draw a series of such buildings (one more loop), and even use of random number generator to make the number of floors variable among the buildings.

A sample of the resulting image is as follows:

The code used to produce it can be downloaded here: building.py


Michael Goldwasser
Last modified: Sunday, 22 December 2019