Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 766 Bytes

building_blocks_exercises.md

File metadata and controls

27 lines (17 loc) · 766 Bytes

Exercises Accompanying the "Building Blocks" Notebook

Exercise 1

Read the file grid2.txt and display the resulting grid. You should recognize it if you've done it correctly. :-)

Exercise 2

Build and show the grid saved in grid3.txt reading lines from the file one at a time.

Exercise 3

Put your code from Exercise 2 in a function and test it out on grid1.txt, grid2.txt, and grid3.txt.

Exercise 4

Use the glob function to get a list of all the "frame" files in the animation directory. Remember that glob works just like ls.

Exercise 5

Use your function from Exercise 3, the list of files from Exercise 4, and the .flash() method to successively display each grid. It will make a short animation when done correctly!