Session 2 Preparation — Videos, Reading and Quizzes

The preparation time you will need for Sessions 2 and 3 is longer than what you will need for most later sessions. Start this work as soon as you can after class; plan to do a few of the items. Take a break and come back to later items. That will be much more fun and better for your learning than doing it all in a row.

A student assistant will be in the F-217 CSSE lab in Mouench Hall Thursday evening 7-9 PM, in case you need help with any of this prep work, or if you have issues with Eclipse/PyDev/Subclipse/etc.

Quizzes:

Do this Quiz on Session 2 as you watch the videos and do the reading (as listed below). This document is a Microsoft Word document; here is the same Quiz on Session 2 (pdf) as a PDF.

You can either:

In either case, bring paper copy of the completed quiz to your Session 2 class.

Videos and Reading (online and textbook):

All of the following are required except the 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. Introduction to Session 2
    • Video (embedded in a web page) [3:14 minutes]
    • Video (as an mp4 that you can download if you want: 7.41 MB)
  2. Getting started in Python via the PyDev Console — Objects, Types, Variables, Assignment and more
    • In Session 1, you completed handouts on:
    • Now work through some of the the follow-up PyDev Console exercises (up through #20 on Page 8) in: Important:
      • If you began the Getting Started exercises in Session 1, simply continue from where you left off.
      • Refer to the above handouts from your in-class work if you have forgotten how to open Eclipse and a PyDev console.
      • If you have lots of time and the desire to continue beyond #20, go for it.  But don't feel obligated to do so.  We will deal with that material later.
      • You are likely to have questions from this exercise: simply bring your questions to Session 2.
  3. Variables
    • Textbook reading: Section 2.1 — Variables (7 pages).
    • See description and advice for what to focus on at the bottom of this page.
  4. Input-Compute-Output Programs
    • Video (embedded in a web page) [8:36 minutes]
    • Video (as an mp4 that you can download if you want: 18.1 MB)
    Additionally, read this Annotated Input-Compute-Output Program that the video walks you through.
    • Do NOT expect to understand EVERYTHING in it in full detail yet!
    • But do BRING your QUESTIONS about it to class.
  5. Calling Functions
    • Video (embedded in a web page) [3:22 minutes]
    • Video (as an mp4 that you can download if you want: 5.64 MB)

    Additionally, here is a handout on Calling Functions that you might find useful as a reference or quick read.

  6. Arithmetic
    • Textbook reading: Section 2.2 — Arithmetic (8 pages).
    • See description and advice for what to focus on at the bottom of this page.
  7. Coding to a Specification
    • Video (embedded in a web page) [4:23 minutes]
    • Video (as an mp4 that you can download if you want: 7.20 MB)
  8. First do it by hand!
    • Textbook reading: Section 2.3 — First Do it By Hand (8 pages).
    • This is a simple but critical section.
  9. Preview of a Session 2 Exercise — An Optional Live Coding Example
    • This video is Optional (but read this note): This long (20 minute) video shows a professor doing the very same exercise that YOU will do at the beginning of your in-class Session 2.
    • As such, watching it may be a great way to walk into class confident of success.
    • But if you run short of time, you can also watch it later, or just ask us questions when you are doing in-class Session 2.
      • After all, that is the POINT of doing the (challenging) exercises IN-CLASS — we are there to answer your questions RIGHT AWAY.
    • So, use your own judgment for how much or little time you want to spend watching this video.
    The video is:
    • Video (embedded in a web page) [19:39 minutes]
    • Video (as an mp4 that you can download if you want: 74.3 MB)
  10. Examples from Session 1

    If time permits, browse the modules (files) from your Session 1 project (checked out form Subversion using Subclipse). For each example:

    • RUN the module.
    • Look at its code and try to see what each statement seems to do.
      • Do NOT expect to understand all the code in all the examples!
      • In particular, the chaos_loop and graphics examples feature several ideas that we will be discussing in Sessions 3 and 4 (but not yet!).
      • The hello_world and hello_goodbye and input_compute_output examples should make some sense to you after you have done the above videos/reading/quiz. You will investigate the ideas from those examples in class during Session 2.

Reading from your texbook (Python for Everyone):

The following reading reinforces and extends material you saw in the videos and online reading.

Required:

Your textbook is: