Session 4 Preparation — Videos, Reading and Quizzes

Instructions:

BEFORE this session, for each of the following videos or reading:

Videos and Reading:

  1. Conditionals: IF and IF-ELSE and IF-ELIF-ELIF...-ELSE statements
  2. The Accumulator Pattern (revisited)
    • This video [9:36 minutes] extends the accumulator pattern from the summing pattern that you have seen previously to include the counting and in-graphics accumulator patterns.

    • The video uses a graphics system call Zellegraphics that preceded RoseGraphics, so you will see zg instead of rg and other such small changes from what we use now.
  3. First Do a Concrete Example By Hand
    • This video [10:39 minutes] works through an example of a technique that you will use often.
    • Note: The video uses the following example: Given a line, draw a diamond from the line. The video should have said that the given line is the upper-left line of the diamond. (Instead, the video wrongly spoke of "positive slope".)
  4. Unit Testing
    1. Read the explanation of
      What is Unit Testing?
      shown to the right, taken from Unit Testing chapter of Software Testing Fundamentals.
    2. Read the explanation of
      Why Do Unit Testing?
      shown on the right, taken from this question on Stack Overflow.
  5. Test-First Programming
    • Read this explanation of Test-First Programming as first popularized as an Extreme Programming Rule: Code the Unit Test First.
      • Follow the above link to read the page at the link, but you do not have to follow the links on that page to other pages.
    • Optional additional reading: Test-First Programming (a subset of Test-Driven Programming, TDD) is widely used in Agile Software Development Processes, as described at length in this optional Agile 101 article.
  6. You might find it helpful to review previous videos, especially the ones on:
  7. After doing the above, but before doing the in-class project (in PyCharm):

    • Do this before-the-session quiz.
    • You do not have to print the quiz (unless you want to). Just hand-write your answers on paper or type your answers into a file, whichever is easier for you.
  8. When you are ready to begin the in-class project (in PyCharm):