Code as a Liberal Art, Spring 2024

Unit 1, Lesson 4 Homework

Due: Wednesday, February 21, 8pm

    As we've discussed, for each homework please create a new, clearly named subfolder in your Google Drive folder (for example, Unit 1, Lesson 4 ) and put any files for the assignment in there. Please create a new Python file (.py) for each homework part and name the files accordingly. For example unit1_lesson4_hw_part1.py, or if your folder is accurately named, simply name the file part1.py. Ambiguously labeled homework folders or files may not receive credit if I cannot identify which assignment they are meant to fulfill. Thank you.

  1. Review the class notes for this week.
  2. Working with the code examples from section III, create your own image by building up patterns of pixels using the modulo operator and other techniques from those examples. Try 2-3 versions of this. Run your code and upload the output into your homework directory.

  3. Working with the code examples from section IV, create your own image by collaging together at least 4 different images specified on the command line. Try to bring in some techniques from serction III here as well, so that for example, you create transparent pixels in your images using some of the pattern techniques from the earlier examples.

  4. I still have not gotten a Gist from everyone. If you have not yet done so, please create a Gist and tag me in it. See the page about asking for help on the class website with instructions.