In the Loop

Lab 2

In this lab you will create programs that implement some of the concepts that you’ve recently learned in class and in your readings. Specifically, you will practice writing and using for loops to handle repetitive operations.

Goals
  • Become more comfortable using variables and mathematical expressions
  • Use for loops to solve a variety of programming problems
  • Generate simple ASCII graphics using patterns with nested loops
  • Generate fun images with the picture.py module
README

Honor Code Reminders:

  • Discussing high-level ideas with other students is encouraged, but only show your actual code to course staff (professors/lab helpers/tutors). The only exception is the warmup, which is to be completed in pairs.
  • Consulting online resources other than assigned reading or documentation provided by the lab instructions is prohibited. Course staff will be happy to answer any questions you have.
  • Use of generative AI for any reason is not allowed. This includes for both writing code and for debugging or reformatting code you wrote.

Instructions describing what commands are available for drawing shapes can be found here.