6.2 Reusability

6.2.1 Video

6.2.2 Slides


6.2.3 Exercise

Visualize your code.

  • Use yellow for scripted code, purple for structured code (for-loops, functions, etc.), and green for comments

  • Use any tool that works for you (powerpoint, word, paint, or good old pencils and paper)

  • During this exercise, try to identify yellow parts that can be structured and turned into (a) function(s). Label them, or rewrite them if you have time.

  • Make a screenshot or picture of your visualization, and share it on Teams!