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

CPSC 217: Course outline spring 2022

Index (shortcut to major sections of the webpage)

 

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

 

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

Day/Time

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

 

Instructor contact Information

James Tam

Office time: TR (3:50 PM - 4:30 PM) via a Zoom link (passcode = 'hope'):

Email: tam@ucalgary.ca (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. 

You can purchase the eText from the university bookstore. If you also want a print edition you have an option to purchase it at a discount.

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: www.ucalgary.ca/it)

Tutorial information (teaching and help tutorials)

To use the computers in the first floor Math Sciences lab you will login using your CPSC account. By default the account name and password will be identical to that of your university account. For more information about your CPSC account (such as how to change your password) see the following [Information link]. The labs are accessible 24/7 using your UC ID card If you have access problems then contact [Campus security] to your card can be enabled.

Teaching tutorials (you registered for a section with you signed up for the course): Teaching will be in person in the computer labs - below - starting the week of May 8 - 14). Teaching materials will be available in D2L under 'content' in D2L and under Content->Teaching tutorials

 

Tutorial

Location

Instructor name

Contact information

T01: MW  09:00-10:50 MS 176 Aminbeidokhti, Amir (a MAC user) amir.aminbeidokhti@ucalgary.ca
T02: MW  17:00-18:50 MS 160 Farajian, Samin (a MAC user) samin.farajian@ucalgary.ca
T03: MW  15:00-16:50 MS 160 Farajian, Samin (a MAC user) samin.farajian@ucalgary.ca
T04: TR  16:00-17:50 MS 160 Al Marouf, Ahmed (a Windows user) ahmedal.marouf@ucalgary.ca
T05: MW  11:00-12:50 MS 176 Aminbeidokhti, Amir (a MAC user) amir.aminbeidokhti@ucalgary.ca

Teaching schedule for the teaching tutorials

Shortcuts for each week of tutorial

Week
 
Activities for the teaching tutorials
May 1- 7   Tutorials don't start until next week
May 8 - 14 (in person tutorials start this week: locations/days/times)   First tutorial: [Examples] [Exercises]
  • Time to work through A0 with the tutorial instructor available for help.
  • Going over the A1 requirements
  • Running the IDLE python editor
  • Display of output
  • Triple quoted output
  • Common operators
  • Operator precedence, the order of execution for python operators

Second tutorial: [Examples] [Exercises] [Solutions]

  • Getting user input
  • Formatting output using escape codes
  • Information types
  • Formatting output using format specifiers
  • Types of programming errors: syntax, runtime, logic
  • Documenting your python programs
  • Making backups and program versioning
  • Going over the mini-A2 requirements
May 15 - 21   First tutorial: [Examples] [Exercises]
  • Going over the A2 requirements
  • IF
  • IF-ELSE
  • Logic (AND, OR, NOT) and branching
Second tutorial: [Examples] [Exercises]
  • Going over the mini-A3a requirements
  • IF-ELIF
  • Multiple IFs
  • Examples of logic errors in branches
  • 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
     

 

 
May 22 - May 28  

First tutorial:

  • Monday: Victoria Day holiday, no classes  today.
  • Tuesday: In order to stay in sync with Monday's tutorial no classes will be held today.

Second tutorial: [Debugging examples] [Functional decomposition: examples] [Functional decomposition: exercises]

  • Going over the mini-A3b 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]
  • Going over the A3 requirements
  • 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).
May 29 - June 4   First tutorial:
  • More complex examples of programs employing functions: return values, local variables, global variables, scope, tracing the order of function calls, parameter passing mechanisms (value, reference), the importance of programming style (tracing an example employing bad style in order to illustrate)
  • Going over the mini-A4a requirements
  • Going over the mini-A4b requirements
  • [Examples: functions] [Exercises: functions]

Second tutorial:

  • Basics of lists vs. strings.
  • Creating fixed sized lists, creating lists dynamically & randomly.
  • List references and passing lists as parameters.
  • Using the chr function and ASCII codes.
  • 2D lists
  • [Examples: lists] [Examples: 2D lists] [Exercises: lists]
June 5 - 11   First tutorial:
  • More complex programs involving 2D lists (closer to real world applications).
  • Employing a debugging tool in a program. [Examples] [Exercises]
  • Going over the mini-A4c requirements

Second tutorial:

  • Going over the A4 requirements.
  • File I/O examples including a multi-version example illustrating how programs with logic errors when reading from a file can be debugged. [Examples]
June 12 - 18  
  • Open tutorial: 
    • No new teaching will occur.
    • The tutorial instructor will be available during the [scheduled tutorial time in the usual tutorial room] (not the CT area) 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.
 

 

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

Continuous tutorial schedule: [CPSC 217 schedule for spring 2022]

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

Shortcuts for each week of lecture

Approximate time each topic will be covered in lecture Lecture topics & schedule Relevant textbook chapters: "Starting Out with Python" (Gaddis T) Addison-Wesley. Graded & ungraded component due during the week: Note that all assignments are due at 4 PM
Student orientation
  • Getting started as a new CPSC student. Includes information on how to access the CPSC computer network when you are working from home. A portion of these lessons will be covered in tutorial later in the term term, other resources are available for your reference. [Orientation link]

 

Not applicable  
May 1 - 7 (there is only one lecture this week).
  • Introduction to the course, administrative about how the course will be run such as grading information. [PDF notes] [PowerPoint]

 

  • Introduction to computer programming [Examples]
    • Part I: writing and running a python program, variables, displaying information to the user, common math operators. [PDF notes] [PowerPoint
       
 

 

 

  • Introduction to programming: Chapter 1 & 2, Appendix A (additional information for installing Python on your own computer)

 

May 8 - 14
  • Introduction to computer programming [Examples]
    • Part II: Getting information from the user, formatting text output. [PDF notes] [PowerPoint]
  • Introduction to computer programming [Examples]
    • Part III: Named constants, documenting programs, prewritten python functions, common programming errors, programming style: layout and formatting of your program. [PDF notes] [PowerPoint]

 

 

 

 

 

 

 

  • Branching: Chapter 3
  • A0  (not graded) Due Tuesday May 10.
  • Full A1 Friday May 13 (TA deadline to have grading sent to instructor: May 20)
May 15 - 21
  • Branching: Chapter 3

 

  • Loops: Chapter 4
  • Mini-A2 Friday May 20 (TA deadline to release grades May 27)
May 22 - 28 (Monday May 23 is the Victoria Day holiday: no office hours or CT sessions)
  • Functions/decomposition
    • Part I: The top down approach to functional decomposition, defining functions, calling functions you have defined, scope (local and global), declaring variables locally, benefits of declaring variables locally. [PDF notes] [PowerPoint] [Examples]
    • Part II: Parameter passing, function return values, function specific style requirements, documenting function. [PDF notes] [PowerPoint] [Examples]
  • Functions: Chapter 5 (don't worry about the material in Section 5.9, 5.10 yet)
  • Full A2: Tuesday May 24 (TA deadline to have grading sent to instructor: May 31)
  • Mini-A3a: Friday May 27 (TA deadline to release grades June 3)
May 29 - June 4
  • Composites: Lists & Tuples: Chapter 7

  • Composites: Strings Chapter 8

 

  • Mini-A3b: Monday May 30 (TA deadline to release grades June 6)
  • Full A3 Friday June 3 (TA deadline to have grading sent to instructor: June 10)
June 5 - 11
  • Introduction to problem solving
  • Files & exceptions
    • 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[Examples]
       
  • Files: Chapter 6

 

  • Mini-A4a: Monday June 6 (TA deadline to release grades June 13)
  • Mini A4b: Wed June 8 (TA deadline to release grades June 15)

 

June 12 - 18 (16th is the last day of the term).
  • Introduction to computer science: 
    • An overview of some research areas and higher level courses in Computer Science (Human-Computer Interaction, computer graphics, artificial intelligence, computer vision, software engineering, computer security, games programming. [PDF notes] [PowerPoint
  • Computer history:
    • A brief overview of computer history: developments in computers and related technologies from the 1970s onward. [PDF notes] [PowerPoint
  • Since all the required material has been covered as of Tuesday June 14 this will be the last lecture for this semester.

 

  • Mini A4c: Mon June 13 Wed June 15 (TA deadline to release grades June 22)
  • Full A4 Thu Jun 16 (TA deadline to have grading sent to instructor: June 23)