Skip Navigation or Skip to Content

Foundations of Programming (Python) Labs

LAB 08-C: Working with Attributes:

In this Lab, we’ll add attributes to the class we created in Lab 08-B.

  1. Make a copy of Lab08_B.py and save it as Lab08_C.py
  2. Add code to create attributes.
  3. Add code to populate the class attributes.
  4. Test the class and write down how the code works.

Note about testing: Make sure to test that the script works as expected (with ‘good’ values).
But also think about what values to use to test that you can’t break your script.
These tests typically are more efficient.

Back to self guided, Video only Materials

Back to self guided, Video plus Written Materials

Back to guided, Video plus Written Materials plus Personal Guidance, Feedback, and Support (class setting)