Course web page: Introduction to problem solving with applications James Tam Return to the course web page

CPSC 231: Tutorial Teaching Schedule

Location of tutorial examples: /home/231/tutorials [Shortcut link]

Week Topics covered
May 14 - 20 First tutorial (Wednesday):
  • Introduction to the CPSC network
  • The UNIX graphical manager
  • Using a UNIX text editor e.g. GEdit, NEdit
  • Going through Assignment zero 'A0' as a tutorial exercise
  • Overview of the file system and important websites
  • Going through Part I of Assignment 1 'A1' as a tutorial exercise

Second tutorial (Friday):

  • Discussion of the grading system for CPSC 231
  • Assignment requirements & finding the marking feedback spreadsheet in D2L
  • Introduction to creating programs in D2L
    • Creating, translating and running Python programs in Linux
    • Text output
    • Variables
    • Text input
    • Common operators in Python
    • Conversion functions: int(), float(), str()
    • Text output: escape codes
    • Text output: Format specifiers
May 21 - 27 First tutorial (Wednesday):
  • Variable naming conventions
  • Named constants
  • Precedence: order of operation
  • TA goes over mini-A2
  • Program documentation
  • TA goes over A2
  • Syntax, runtime and logic errors

Second tutorial (Friday):

  • IF
  • IF, ELSE
  • Logic and branching
  • Branching logical errors
  • Generating random numbers
  • Repetition using loops
  • Generating random numbers
  • Introduction to nesting
     
May 28 - June 3 First tutorial (Wednesday):
  • Nesting applied to a previous example ("cat age")
  • TA goes over mini-A3
  • Common programming errors
  • Tips for program debugging

Second tutorial (Friday):

  • Defining functions
  • Declaring local variables
  • Passing parameters/inputs into functions
  • TA goes over A3
June 4 - 10 First tutorial (Wednesday):
  • Function inputs/parameters as local variables
  • Passing parameters by value
  • Function return values
  • Boolean functions
  • Global vs. local scope
  • The 'global' keyword

Second tutorial (Friday):

  • TA goes over mini-A4
  • Creating 1D lists: hard coded fixed size and dynamically via the append() function
  • Pass by reference e.g. passing lists as inputs/parameters to functions
  • Programs with 2D lists (grid): random initialization of elements, displaying the grid, modifying elements
June 11 - 17 First tutorial (Wednesday):
  • TA goes over A4
  • TA goes over mini-A5
  • Introduction to classes and objects
  • Drawing graphics using tkinter

Second tutorial (Friday):

  • TA goes over A5
  • TA hands back the midterm goes over select questions

 

June 18 - 24 First tutorial (Wednesday):
  • Open tutorial: TA will be available for help, to answer questions.
  • Students can work in the labs during that time and can come to any tutorial for help (and not just the one in which they are registered)

Second tutorial (Friday):

  • Recursive implementations of iterative programs (using recursion in place of a loop)
  • Wasteful use of recursion: implementing the Fibonacci numbers
  • Advanced recursive example employing backtracking: traversing a maze
  • Student recursive exercises
June 25 - 27 No tutorials this week (last day of the semester is Tuesday June 27 (regular CT will run on earlier in the week however)

Examples of strings: accessing elements, illustrating the immutability of strings, string concatenation vs. addition (review), string splitting and slicing, string 'functions': upper

Exercises using strings