1
To the faculty page of James Tam | Return to the course web page |
Day/Time |
Lectures will
be held live during the scheduled day/time (passcode for both =
hope)
|
James Tam |
|
Office time: TR (3:50 PM - 4:15 PM) held in the lecture room. |
|
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 course information sheet (includes the university approvals for topics such as grading) |
Official recommended textbook | "Python for everyone: 3rd edition" (Cay S. Horstmann, Rance D. Necaise) Wiley, 3rd edition. |
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). |
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
- Tutorials include mandatory information for the course. Time will be spent on the following: TA's teaching new skills, discussion of assignment requirements.
Tutorial
Location Instructor name
Contact information
T01: MW 10:00-11:50 AM MS 176 Fahim Anzum (Windows user) fahim.anzum@ucalgary.ca T02: MW 5:00-6:50 PM MS 160 Danissa Sandykbayeva (Windows user) danissa.sandykbay1@ucalgary.ca T03: MW 3:00-4:50 PM MS 160 Sonali Keshava Murthy Naik ( user) sonali.keshavamurthy@ucalgary.ca T04: TR 4:00-5:50 PM MS 160 Danissa Sandykbayeva (Windows user) danissa.sandykbay1@ucalgary.ca T05: MW 12:00-1:50 PM MS 176 Fahim Anzum (Windows user) fahim.anzum@ucalgary.ca Teaching schedule for the teaching tutorials
Shortcuts for each week of tutorial
- April 30 - May 6 (no tutorials held this week)
- May 7 - 13
- May 14 - 20
- May 21 - May 27
- May 28 - June 3
- June 4 - 10
- June 11 - 17
Week
Activities for the teaching tutorials
April 30 - May 6 Tutorials don't start until next week Tutorial week 1: May 7 - 13 (in person tutorials start this week: [locations/days/times] Students: Get your [computer science login information] before tutorial First tutorial: [Examples] [Exercises]
- Time to work through A0 with the tutorial instructor available for help.
- Going over the [Premini-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] [Exercise 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-A1] requirements
Tutorial week 2: May 14 - 20 First tutorial: [Examples] [Exercises]
- Going over the [Full A1] requirements
- IF
- IF-ELSE
- Logic (AND, OR, NOT) and branching
Second tutorial: [Examples] [Exercises]
- Going over the [mini-A2a] 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
Tutorial week 3: May 21 - May 27 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-A2b] 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 [A2] 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).
Tutorial week 4: May 28 - June 3 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-A3a] requirements
- Going over the [mini-A3b] 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: 1D lists] [Examples: 2D lists] [Exercises: lists]
Tutorial week 5: June 4 - 10 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-A3c] requirements
Second tutorial:
Tutorial week 6: June 11 - 17
- Open tutorial:
Similar to regular CT, students can attend the help session of any tutorial instructor and not just the one they are registered in.
- 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.
Help tutorials = Continuous tutorials (or CT for short) where you can go for help outside of class
- These in-person sessions will typically be staffed by the tutorial instructors but they are not mandatory for students and are provided so that you can get help.
- Location: First floor Math Sciences computer lab (near MS151 at a desk labelled as the "217 CT" or something similar).
- The CT is not inside of MS151 (the sign on the wall is out of date)
- You are NOT restricted getting help from the CT session staffed by the person whose tutorial you are registered in (you can go to any TA for help).
- If you have questions then it's best to ask them during the CT unless it's a question that can be answered fairly quickly via email.
Continuous tutorial schedule: [CPSC 217 schedule for spring 2023]
Shortcuts for each week of lecture
- Pre-lecture: student orientation
- Week 1: April 30 - May 6
- Week 2: May 7 - 13
- Week 3: May 14 - 20
- Week 4: May 21 - 27
- Week 5: May 28 - June 3
- Week 6: June 4 - 10
- Week 7: June 11 - 17
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 term, other resources are available for your reference. [Orientation link]
Not applicable Link to practice problems Lecture week 1: April 30 - May 6 (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: Section 1.4 - 1.6, Chapter 2, Appendix A, B, C.
Lecture week 2: May 7 - 13
- 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 [Examples]
- Part I: IF, IF-Else, Logical-AND, Logical-OR, Logical-NOT. [PDF notes] [PowerPoint]
- Introduction to programming (as listed above).
- Branching: Chapter 3
- A0 (not graded) Due Tuesday May 9.
- Premini-A1 Due Friday May 12 (TA deadline to have grading sent to instructor: May 19)
Lecture week 3: May 14 - 20
- Branching [Examples]
- Part II: Logic and branching, multiple IFs, the IF-ELIF structure, nested branches, the IF-IN operator, using an epsilon. [PDF notes] [PowerPoint] [Exercise descriptions] Slightly modified version (May 15) of the notes (a bit more details about nesting): [PDF notes] [PowerPoint]
- Looping/repetition [Examples]
- Part I: while-loops, for-loops, sentinel controlled loops. [PDF notes] [PowerPoint]
- Part II: nesting branches and loops. [Examples] the break instruction and why it generally shouldn't be used, infinite loops, testing loops. [PDF notes] [PowerPoint] [Case study: branching, looping, nesting in a simple adventure game] [A few practice traces to try on your own]
- Part III: Usability heuristics for user friendly program design (to allow time to go over technical details/case study in class this lecture will be pre-recorded) [PDF notes] [PowerPoint]
- Optional extra resource, nesting and loops. This semester some of this material was incorporated into Part II of the repetition notes: [PDF notes] [PowerPoint]
- Branching (as listed above)
- Repetition/Loops: Chapter 4
- Mini-A1 Due Friday May 19 (TA deadline to release grades May 26)
Lecture week 4: May 21 - 27 (Monday May 22 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 A1: Tuesday May 23 (TA deadline to have grading sent to instructor: May 30)
- Mini-A2a: Friday May 26 (TA deadline to release grades June 2)
- In class midterm examination: Thursday May 25 [Exam information]
Lecture week 5: May 28 - June 3
- 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. [PDF 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.
- Composites
- Part I: Declaring list variables, accessing a list vs. elements in a list, passing list as parameters, methods of parameter passing, avoiding list bound exceptions. [PDF notes] [PowerPoint] [Examples] [Exercises]
- Part II: , using multi-dimensional lists, creating 2D lists, accessing a 2D list and its parts, basic list operations. [PDF notes] [PowerPoint] [2D list examples] [Working with two parallel lists]
- Functions (as listed above)
Composites (Lists): Chapter 6
Lecture week 6: June 4 - 10
- 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]
- Introduction to problem solving
- How to come up with a program when the solution or even a definition of the problem isn't immediately self-evident. [PDF notes] [PowerPoint] [Examples]
- More advanced 2D list exercise:
Lists (as above)
Problem solving: Not applicable
Files: Section 7.1 - 7.2, 7.5 - 7.6
- Mini-A3a: Monday June 5 (TA deadline to release grades June 12)
- Mini A3b: Wed June 7 (TA deadline to release grades June 14)
Lecture week 7: June 11 - 17 (15th is the last day of the term).
- Composites
- Part III: 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] [Examples]
- Optional (not tied to the exam, not required in assignments) programming concepts (recursion and a brief introduction into object-oriented programming): [PDF notes] [PowerPoint notes] [Object-Oriented examples] [Recursive examples]
- Introduction to computer science (view: pre-recorded lecture content):
- 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 (view: pre-recorded lecture content) :
- A brief overview of computer history: developments in computers and related technologies from the 1970s onward. [PDF notes] [PowerPoint]
Not applicable
Final exam information: it will be scheduled by the Office of the Registrar ([Final exam from the office of the Registrar]). [Final exam information]