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

CPSC 231: Course outline spring 2025

Index (shortcut to major sections of the webpage)

 

Free resources for all U of C students

Using the computers in the tutorial room

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)

Day/Time

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

Instructor contact Information

James Tam

Office time: Tuesday and Thursday 4:00 - 4:30 PM via Zoom (different meeting link than for the lecture but the same passcode):

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)] (includes the university approvals for topics such as grading)

 

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 textbooks Print, available via the UC bookstore: "Python for everyone: 3rd edition(Cay S. Horstmann, Rance D. Necaise) Wiley, 3rd edition. 

Electronic text, available via a PDF: https://link.springer.com/book/10.1007/978-3-030-18873-3

 

Link to other UC licensed textbooks Also you can search the UC library website [Link 1] or [Link 2]  for 'free' python eTexts (requires authentication).

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 [first tutorial week]). Teaching materials will be available in D2L under 'content' in D2L and under Content->Teaching tutorials

 

Tutorial

Location

Instructor name

Contact information

T01: MW  12:00 - 1:50 PM MS 160 Danissa Sandykbayeva (Windows user as well as the  Ubuntu version of Linux) danissa.sandykbay1@ucalgary.ca
T03: TR 10:00 - 11:50 AM MS 160 Mika Ong (primarily a Windows user, secondary OS is Linux) mikaelahope.ong@ucalgary.ca

Teaching schedule for the teaching tutorials (additional links will be added during the semester)

Shortcuts for each week of tutorial

Week
 
Activities for the teaching tutorials
Tutorial week 1: May 4 - 10 (in person tutorials start Wed./Thur. this week): [locations/days/times]   Students: Get your [login information squared away] before tutorial

First tutorial:

  • No tutorials on Monday/Tuesday

Second tutorial: [Examples] [Exercise descriptions] [Starting files for the exercises] [Exercise solutions]

  • Time to work through [A0] with the tutorial instructor available for help.
  • Going over the [Mini1a] requirements
  • Going over the [Mini1b] requirements
  • Running the IDLE python editor
  • Display of output
  • Triple quoted output
  • Common operators
  • Operator precedence, the order of execution for python operators
  • Code details of documentation and variable naming conventions
  • Coding details of named constants
  • Getting user input
  • Variables & information types
 
Tutorial week 2: May 11 - 17   First tutorial: [Examples] [Exercise descriptions] [Exercises: starting programs] [Exercises: solutions]
  • Documenting your python programs
  • Making backups and program versioning
  • Going over the [Full A1] requirements
  • IF
  • IF-ELSE
  • Logic (AND, OR, NOT) and branching

Second tutorial: [Examples] [Exercise descriptions] [Exercises: starting programs] [Exercises: solutions]

  • 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
  • Going over the [Mini_A2a] requirements
Tutorial week 3: May 18 - May 24  

First tutorial:

  • Monday May 19: Victoria Day holiday, no classes  today.
  • Tuesday May 20: "Open tutorial".
Second tutorial: [Examples]
  • Going over the [mini-A2b] requirements
  • Going over the [mini-A2c] requirements
  • Going over the [Full A2] 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] 

 

Tutorial week 4: May 25 - 31   First tutorial:

Second tutorial:

Tutorial week 5: June 1 - 7   First tutorial:

Second tutorial:

  • Going over the [Full A3] 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]
  • Composites: tuples and strings [Examples]
  • Exercise: [Finding candidate functions]
Tutorial week 6: June 8 - 14   First tutorial:

Second tutorial:

Tutorial week 7: June 15 - 21 (last day of the term is Monday June 17)  

 

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

Continuous tutorial schedule: [Schedule for spring 2025]

 

Main grid: course schedule for the lecture, lecture notes, assignment information (additional links will be added during the semester)

Shortcuts for each week of lecture

Approximate time each topic will be covered in lecture Lecture topics & schedule Relevant textbook chapters: "Python for Everyone (3e)" Wiley

Also you can search the UC library website [Link] for 'free' python eTexts (requires authentication).

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 other resources are available for your reference. [Orientation link]

 

Not applicable [Link to practice problems]
Lecture week 1 (1st lecture is Tuesday May 7): May 4 - 10
  • Introduction to computer programming Part III
    • Named constants, documenting programs, prewritten python functions, common programming errors, programming style: layout and formatting of your program. [Notes: PDF notes] [Notes: PowerPoint] [Examples]

 

Introduction to programming: Section 1.4 - 1.6, Chapter 2, Appendix A, B, C. 
  • [A0] due Thursday May 8, not graded but still important as it can affect graded work.
  • [Mini-A1a] Due Friday May 9 (TA deadline to release grades May 16)
Lecture week 2: May 11 - 17
  • Introduction to computer programming Part III (continued from last week)

 

  • Introduction to programming (as listed above).

     

  • Branching: Chapter 3

 

 

 

  • Repetition/Loops: Chapter 4
  • [Mini-A1b] Due Friday May 16 (TA deadline to release grades May 23)
Lecture week 3: May 18 - 24 (Monday May 19 is a holiday: no office hours or CT sessions)

 

  • Functions/decomposition Part I
    • 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. [Notes: PDF notes] [Notes: PowerPoint] [Examples]
  • Functions/decomposition Part II

     

 

  • Repetition/Loops: Chapter 4

 

 

 

 

 

 

 

  • Functions: Chapter 5 (don't worry about the material in Section 5.9, 5.10 yet)

 

 

  • [Full A1] Due Friday May 23 (TA deadline to have grading sent to instructor May 30)
Lecture week 4:  May 25 - 31
  • Functions/decomposition Part II (Continued from last week)
  • Functions/decomposition 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. [Notes: PDF notes] [Notes: PowerPoint] [Examples]
    • Functions/decomposition: Helper exercises/programs:
      • [Helper 1]:  Determining the level in a functional hierarchy should variables be declared.
      • [Helper 2]:  Decomposing a nested structure into multiple functions.
      • [Helper 3]:  Inter-function communication. Information from what function needed in another function.

 

 

  • Functions: Chapter 5
Lecture week 5: June 1 - 7
  • Composites (Lists): Chapter 6

 

 

  • [Full A2] Tuesday June 3 (TA deadline to have grading sent to instructor: June 10)
  • [Mini-A3a] Due Wednesday June 4 (TA deadline to release grades June 11
  • [Mini-A3b]Due Friday June 6 (TA deadline to release grades June 11)

 

Lecture week 6: June 8 - 14 (last lecture is Thursday)

 

  • Lists (as above)

 

  • Problem solving: Not applicable

 

 

  • Files: Section 7.1 - 7.2, 7.5 - 7.6

 

  • [Mini-A3c] Due Wednesday June 11 (TA deadline to release grades June 18)
  • [Full A3] Due Thursday June 12 (TA deadline to have grading sent to instructor June 19)
  • [Mini-A4] Due Friday June 13 (TA deadline to release grades June 20)
Lecture week 7: June 15 - 21 (17th is the last day of the term).
  • Lecture material you can learn on your own time (not covered live but instead will be pre-recorded).
  • No lecture this week as the last day of the term is Monday June 17
  • Not applicable

  • [Mini-A5] Due Monday June 16 (TA deadline to release grades June 23)
  • [Full A4]  Due Monday June 16 (TA deadline to have grading sent to instructor June 23)
Final exam period: June 18 - 21 Final exam information: it will be scheduled by the Office of the Registrar ([Final exam from the office of the Registrar]). [Final exam information]