Session 18 Preparation — Videos, Reading and Quizzes

Instructions:

For each of the following videos or reading:

Videos and Reading:

  1. 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.

  2. 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.

  3. Loops within Loops (aka Nested Loops) — How they work
  4. A Technique for Solving Print-On-Console Loop-Within-Loop Problems
    • This Video [8:20 minutes]
  5. 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.