Session 17 Preparation — Videos, Reading and Quizzes

Quiz

Go to Moodle to find the Quiz for this Preparation.

Do the quiz as you watch the videos and do the reading. The quiz follows the same order as the videos/reading do.

You can access the videos from here or from Moodle; they both point to the same place.

Videos and Reading:

All of the following are required except items labeled Optional are, well, optional (i.e., things that may be interesting but do not directly pertain to your success in this course).

  1. Iterating through a sequence, review
  2. Patterns for Iterating Through Sequences
    • In the Session 12 Preparation, you watched the first 9 minutes of this Watch the above video again, paying especially close attention to the portion that starts at the 9:00 minute mark.
    • Be sure to understand:
      • The 3 basic ways to iterate through a loop.
      • The FIND pattern.
      • The two-places-at-once pattern.
      • The parallel-sequences pattern.
      • The MAX/MIN pattern.
  3. Formatting strings (to make them look pretty, or like you want them to look) — basic idea

    To get you started, read this explanation of the basic idea of the format method.

  4. Formatting strings — details

    Optional reading: From The Python 3 Tutorial, read ONLY the following sections of the chapter on Formatted Output:

    • Three Ways for a Nicer Output
    • The Pythonic Way: The string method “format”
      • But just SKIM over the details,knowing that you can return to them for reference as needed.

    Skip the section titled The Old Way or the non-existing printf and sprintf. Of course, you are welcome to read that section, but it shows an older way to format strings that is no longer recommended for Python.

  5. Loops within Loops (aka Nested Loops) — How they work
  6. A Technique for Solving Print-On-Console Loop-Within-Loop Problems
    • This Video [8:20 minutes]
  7. Solved examples to watch AS YOU DO THE IN-CLASS exercises (and NOT before then):

    The following two videos are for the “ live coding ” that your instructor may do with you in Sessions 18 and/or 19. They will be most useful to you if you:

    • Do the coding AS YOU WATCH THE VIDEOS.
    • Do NOT watch them now, since you do not yet have the project with the problems. (Although you may watch them now, if you wish.)
    • Wait for class. Your instructor may or may not have you watch these videos then.