Full materials
Mirror of the CMPT 120 course website for Spring 2014 (with 28 lectures, 2 assignments, 4 labs, etc.).
Below is a mirror of the website previously hosted at:
http://www.sfu.ca/~jlumbros/Courses/CMPT120/
CMPT 120 webpage for Spring 2014
Disclaimer: some of the materials in this course, and on this site, are inspired or borrowed with permission from past instructors, including Diana Cukierman.
Teaching Team
Instructor: Jeremie Lumbroso
TAs:
Note 1: when contacting us generally about course information, please use cmpt-120-help@sfu.ca: all of us will receive your email at the same time, and so all four of us gets a chance to reply, so faster responses.
Note 2: please put “CMPT 120” at the beginning of your subject line when contacting any of us.
Office hours: in TASC 1 9025, on appointment; for general help, tutorials are scheduled in TASC 1 9204, Thursday 12:30pm-2:30pm (and sometimes Friday 12:30pm-2:30pm).
Assignments
- Assignment 1 due by Saturday March 15th at 11:55pm on CourSys and its solution.
- Assignment 2 due by Saturday April 12th at 11:55pm on CourSys its solution.
Lecture Slides
Week 1
- Lecture 0, a general overview of the course (Jan. 6th)
- Lecture 1, what is an algorithm? (Jan. 8th)
- Lecture 2, from algorithms to pseudocode (Jan. 10th)
Week 2
- Lecture 3, what are variables, and some example algorithms (Jan. 13th)
- Lecture 4, a brief history of programming languages, and first steps in Python (Jan. 15th)
- Lecture 5, elementary data type and basic control structures (Jan. 17th)
Week 3
- Lecture 6, introduction to functions and modules (Jan. 20th)
- Lecture 7, turtles (Jan. 22nd) and the code snippets
- Lecture 8, turtles (Jan. 24th)
Week 4
- Lecture 9, strings (Jan. 27th)
- Lecture 10, correction of Course Exercise 3, which you may look up here (Jan. 29th)
- Lecture 11, correction of the turtle spiral
Week 5
- Lecture 12, the associated video (using password “cmpt120”) and PeerWise questions (Course ID: 8709 and Identifier: SFU ID) (Feb. 3rd)
- Quiz 1 and the answers (Feb. 5th)
- Lecture 13 by guest lecturer, Diana Cukierman, flag variables (Feb. 7th)
Week 6
- Lecture 14, the associated video (using password “cmpt120”), user input and complex flags example, intro to nested fors (Feb. 17th)
- Lecture 15, no slides, overhead correction of search and replace
- Lecture 16, no slides, overhead correction of search and replace (continued)
Week 7
- Lecture 17, with code for replace_substr both using nested for loops and a while loop (Feb. 24th)
- Lecture 18, clarification on if statements and more on while loops (Feb. 26th)
- Lecture 19, the while loop continued and more examples (Feb. 28th)
Week 8
- Lecture 20, immutability of strings and iClicker interactive discovery of lists (Mar. 3rd)
- Lecture 21, iClicker prep (Mar. 5th)
- Quiz 2 and the answers (Mar. 7th)
Week 9
- Lecture 21, manipulating lists is just like strings (Mar. 10th)
- Lecture 22, index vs slice, and functions that create new lists, and the is_matrix(L) correction (Mar. 12th)
- Lecture 23, built-in operations on lists, and their mutability; and some experiments on list mutability (Mar. 14th)
Week 10
- Lecture 24, deleting an element from a list and Course Exercise 7 and its solution (Mar. 17th)
- Lecture cancelled on March 19th
- Midterm and its solution (Mar. 21st)
Week 11
- Lecture 25, introduction to files, reading/writing; a help guide on how to access the Python folder and the solution to the two course questions (Mar. 24th)
- Lecture 26, continuing file access (and the work files)
- Lecture 27, writing to files (Mar. 28th)
Week 12
Week 13
- Recap Lecture and practice questions (April 7th)
- Practice exam
Labs
Lab Week 3
Lab Week 4 (should be submitted on
CourSys)
Lab Week 5 (should be submitted on
CourSys)
Lab Week 6 and the
beginning source code (should be submitted on
CourSys)
Resources
Python
- Get Python and IDLE v2.7.6 on the
official webpage:
- if you have Windows, you can either get the 64-bit version if you have a 64-bit computer (“X86-64”), or if you don’t know what kind of computer, you can take the 32 bit version (the first one in the list)
- if you have a Macintosh, pick according to your version of Mac OS X
- Python Tutor to visualize the execution of Python code.
- an online environment to code Python
Puzzles
- Pseudocode exercises with Blocky: http://code.org/api/hour/begin/codeorg
- Puzzles for algorithmic training with Lightbot: http://light-bot.com/hoc.html
- Posted on:
- January 2, 2014
- Length:
- 4 minute read, 703 words
- See Also: