To the faculty page of James Tam Return to the course web page

CPSC 217: Course outline fall 2021

Index (shortcut to major sections of the webpage)



Technical requirements for students in the distance learning version of this course (paraphrased version from what was provided by the university).


A brief overview of the programming language (python) you will learn


Course administration (grading, textbooks, the course instructor's contact information)


Lectures will be held live during the scheduled day/time (passcode for both = hope)


Instructor contact Information

James Tam

Office time: MW (11:00 - 11:50 AM) via a Zoom link (passcode = 'hope'):

Email: (Make sure you specify the course name and number in the subject line)

General information Official course information sheet (summary of official course requirements)


General assignment information

Grade calculator to estimate your term grade: [Excel spreadsheet]

Academic misconduct vs. collaboration: what is allowed for this class

Practice assignments: They won't be for credit but they're extra problems that you can try in order to improve your programming and problem solving skills

Official recommended textbook "Starting Out with Python" (Gaddis T) Addison-Wesley, 5th edition. 

How to get the text: eText ordering (after buying the eText you have an option to order a physical copy at a discount if you wish).

Link to other UC licensed textbooks Safari website: ['Free' books]. (If you see a message about security issues with this site then likely it's because UC-IT hasn't configured it properly so you can contact them about the issue:

Tutorial information (teaching and help tutorials)

Teaching tutorials (material will be available starting the week of Sept. 12 - 18) and will be available via a Zoom link (look under 'content' in D2L and under Content->Teaching tutorials



Instructor name

Contact information

T01 (Windows): TuTh 1:00PM - 1:50PM Saadat, Kimiya
T02 (Windows): MoWe 2:00PM - 2:50PM Saadat, Kimiya
T03 (Windows): TuTh 12:00PM - 12:50PM Ansari, Mohd Akram
T04 (Windows): TuTh 11:00AM - 11:50AM Ansari, Mohd Akram
T05 (Windows): MoWe 2:00PM - 2:50PM Aktar, Farzana
T06 (Windows): TuTh 10:00AM - 10:50AM Mukhrejee, Suvojit
T07 (Windows): TuTh 3:00PM - 3:50PM Hosseini, Seyed Morteza
T08 (Windows): MoWe 11:00AM - 11:50AM Hosseini, Seyed Morteza
T09 (Windows): MoWe 11:00AM - 11:50AM Islam, Ehab
T12 (Windows): TuTh 4:00PM - 4:50PM Aktar, Farzana
T13 (Windows): MoWe 6:00PM - 6:50PM Shadman, Shauvik
T14 (Windows): TuTh 1:00PM - 1:50PM Mukhrejee, Suvojit

Teaching schedule for the teaching tutorials

Activities for the teaching tutorials
Sept. 5 - 11
No tutorials this week
Sept. 12 - 18 (tutorials start this week)
  First tutorial:
  • Time to work through A0 with the tutorial instructor available for help.
  • Going over the A1 requirements

Second tutorial:

  • Getting installing python
  • Running the IDLE python editor
  • Display of output
  • Triple quoted output
  • Common operators
  • Operator precedence, the order of execution for python operators
Sept. 19 - 25
  First tutorial:
  • Getting user input
  • Formatting output using escape codes
  • Information types
  • Formatting output using format specifiers

Second tutorial:

  • Types of programming errors: syntax, runtime, logic
  • Documenting your python programs
  • Making backups and program versioning
  • Going over the mini-A2 requirements
Sept. 26 - Oct. 2 (Thursday Sept. 30 is a holiday)
Tutorials Wednesday Sept. 29
Tutorials Thursday Sept. 30
  • Lessons will pre-created and you can review them whenever you wish. (No need to attend a class during the holiday).
  • The Thursday tutorials will either take the form of a recorded video or else a PDF file  that should provide enough detail so the typical student can follow along.
  • Look in the D2L folder for a particular tutorial for details by the end of the day on Thursday Sept. 30. If there's questions then you should [contact the tutorial instructor]


First tutorial:
  • Going over the A2 requirements

Second tutorial: branching

  • IF
  • Logic (AND, OR, NOT) and branching
Oct. 3 - 9
  First tutorial: Multiple questions in branching
  • Tutorial instructors provide a debriefing of A1: common issues and mistakes.
  • Multiple IFs
  • Examples of logic errors in branches

Second tutorial: Repetition/looping

  • WHILE-loops
  • FOR-loops
    • Counting FOR-loops (iterating through a number sequence).
    • FOR-loops iterating through the characters in a string
  • Nesting
    • A branch in a loop
    • A loop inside of a loop
Oct. 10 - 16 (Monday Oct. 11 is a holiday)
  First tutorial:
  • Monday:
    • No tutorial because of the holiday
  • Tuesday: "open tutorial".
    • No new teaching will occur.
    • The tutorial instructor will be available during the scheduled tutorial time via their Zoom tutorial link (not the CT link) to answer student questions.
    • Similar to regular CT, students can attend the help session of any tutorial instructor and not just the one they are registered in.

Second tutorial:

  • Going over the A3a requirements
  • Bug hunting: Tips for finding and fixing the errors in your programs.
  • TAs will clarify what is and is not allowed in terms of helping others (collaboration) vs. academic misconduct. Presentation material [PDF] [PowerPoint]


Oct. 17 - 23
  First tutorial
  • Going over the A3b requirements
  • Defining & calling programmer specified functions
  • Declaring and using local variables

Second tutorial

  • Going over the A3 requirements
  • Passing information into a function via parameters, arguments, inputs.
  • Communicating information about a local out of a function back to the caller via function return values.
Oct. 24 - 30


  First tutorial
  • Tracing simple programs employing functional decomposition (order of function calls).
  • Defining and using a Boolean function.
  • Tracing more complex programs which employ functional decomposition.
    • Illustrating the importance of good programming style (by employing poor style).

Second tutorial

  • (Exercises will be covered where you must define new functions).
  • Going over the A4a requirements
  • Going over the A4b requirements
Oct. 31 - Nov. 6


  First tutorial:
  • Tutorial instructors provide a debriefing of A2: common issues and mistakes.
  • Basics of lists vs. strings.
  • Creating fixed sized lists, creating lists dynamically & randomly.
  • List references and passing lists as parameters.

Second tutorial

  • Open tutorial:  "open tutorial".
    • No new teaching will occur.
    • The tutorial instructor will be available during the scheduled tutorial time via their Zoom tutorial link (not the CT link) to answer student questions.
    • Similar to regular CT, students can attend the help session of any tutorial instructor and not just the one they are registered in.
Nov. 7 - 13
  Reading week: no teaching or help tutorials scheduled for this week
Nov. 14 - 20
  First tutorial:
  • Iterating through lists and having the program react based on the contents of the elements.
  • Creating a fixed size 2D list.
  • Creating a 2D list in conjunction with the repetition operator.
  • How to modify select elements of a 2D list based on a condition.
  • Defining a Boolean function in conjunction with the state of a 2D list (example covered is required for mini-A4b).
  • Determining the (row, column) coordinates of a point in a 2D list relative to any location in the list.

Second tutorial

  • Implementing a complex simulation (a board game with a portion that's similar to Western chess)  using a 2D list.
  • More practicing determining the relative (row, column) coordinates of other cells in a list for any given location in the list.
  • Adding debugging messages in order to aid in the testing and debugging of a program. This is a required feature of full-A4.
Nov. 21 - 27
  First tutorial
  • Tutorial instructors provide a debriefing of A3: common issues and mistakes.
  • Going over Mini-A4c requirements.
Nov. 28 - Dec. 4
Dec. 5 - 11 (Wed. Dec. 8 is the last day of classes)

Help tutorials = Continuous tutorials (or CT for short) where you can go for help outside of class:

Continuous tutorial schedule: [CPSC 217 schedule for fall 2021]

Main grid: course schedule for the lecture, lecture notes, assignment information

Approximate time each topic will be covered in lecture

Lecture topics & schedule

Relevant textbook chapters: "Starting Out with Python" (Gaddis T) Addison-Wesley.

Graded component due during the week: Note that all assignments are due at 4 PM

  • How to work from home etc.. A portion will be covered in tutorial later in the term term, other resources are available for your reference: [Orientation link]


  • Searching for help using Google (note this is meant to supplement and but not act as a replacement for lecture and tutorial lessons). [PDF notes] [PowerPoint notes]
  • Not applicable
1: Sept. 5 - 11 (first lecture for this class is Sept. 8) Administrative information for the course such as contact information, grading etc. [PDF notes] [PowerPoint]
  • Not applicable
2: Sept. 12 - 18 Introduction to programming. [Examples]
  • Part I, writing and running a python program, variables, displaying information to the user, common math operators: [PDF notes] [PowerPoint]
  • Part II, getting information from the user, formatting text output: [PDF notes] [PowerPoint]
  • Introduction to programming: Chapter 1 & 2, Appendix A (additional information for installing Python on your own computer)
A0  (submitting files using D2L and checking submissions, not graded) closes off submission on Sept 17).
3: Sept. 19 - 25

Introduction to programming.

  • Part III, named constants, documentation, pre-created python functions, common programming errors, programming style (layout and formatting of your program code): [PDF notes] [PowerPoint]

Branching. [Examples]

  • Introduction to programming (as listed above).
  • Branching: Chapter 3


Full A1 (due Fri. Sept. 24)


4: Sept. 26 - Oct. 2

Branching. [Examples]

  • Part II: Branching/decisions: logic and branching, multiple IFs, the IF-ELIF structure, nested branches, the  IF-IN operator: [PDF notes] [PowerPoint]
Repetition. [Examples]
  • Branching (as listed above)
  • Repetition: Chapter 4
5: Oct. 3 - 9 Repetition.


  • Repetition (as listed above)
6: Oct. 10 - 16 (Monday Oct. 11 is a holiday) Functional decomposition. [Examples]
  • Part I, the top down approach to functional decomposition, defining & calling new functions that you write, local variables, scope (global vs. local): [PDF notes] [PowerPoint]
  • Part II, Parameter passing, function return values, function specific style requirements, documenting functions. [PDF notes] [PowerPoint]


  • Functions: Chapter 5 (don't worry about the material in Section 5.9, 5.10 yet)
Mini-A2 (due Wed. Oct. 13)
7: Oct. 17 - 23 Functional decomposition. [Examples] [Exercises]
  • Part II (Continued)
  • Part III: return to scope, what level/where to declare variables, Boolean functions, splitting up long functions, common errors with functions, program design & testing functions. [PDF notes] [PowerPoint]
  • Functions (as listed above)
Full A2 (due Tue. Oct. 19)

Mini-A3a (due Fri. Oct. 22)

8: Oct. 24 - 30 Functional decomposition. [Examples] [Exercises]
  • Part III (Continued)


Composites, lists. [Examples]

  • Part Ideclaring list variables, accessing a list vs. elements in a list, passing list as parameters, methods of parameter passing. [PDF notes] [PowerPoint notes]


  • Functions (as listed above)
  • Composites (Lists): Chapter 7


Mini-A3b (due Tue. Oct. 26)
9: Oct. 31 - Nov. 6 Composites, lists. [Examples]
  • Part IIAvoiding list bound exceptions, using multi-dimensional lists, creating 2D lists, accessing a 2D list and its parts, basic list operations [PDF notes] [PowerPoint notes]

Introduction to problem solving. [Examples]

[PDF notes] [PowerPoint notes]


  • Composites (Lists - as described above):
Full A3 (due. Fri. Nov. 5)
Nov. 7 - 13 Reading week: no teaching or help tutorials scheduled for this week    
10: Nov. 14 - 20

Files & exceptions. [Examples]

  • Reading from and writing to text files using python's iterating for-loop as well using the more generic algorithm employing a while-loop. Exception handling to deal with common run-time errors. Creating dynamic 2D lists when the dimensions are unknown ahead of time (such as reading the data from a file):  [PDF notes] [PowerPoint notes]



  • Files: Chapter 6

Mini-A4a (due Fri. Nov. 19)
11: Nov. 21 - 27 Composites, strings & tuples. [Examples]
  • Part III (last two types of composites) declaring variables that are strings or tuples, accessing the entire composite vs. elements of the composite variable, passing strings and tuples as parameters, mutable vs. immutable types, how functions only return a single piece of data (tuple):  [PDF notes] [PowerPoint notes]
  • Composites: Strings Chapter 8

Mini-A4b (due Fri. Nov. 26)
12: Nov. 28 - Dec. 4 Introduction to computer science, a brief overview of computer history.
  • None
Mini-A4c (due Fri. Dec. 3)
13: Dec. 5 - 11 (Wed. Dec. 8 is the last day of classes) Introduction to computer science, a brief overview of computer history.
  • None
A4 (due Wed. Dec. 8)