CMPT 120 Intro. to CS & Programming I

Undergraduate course, Simon Fraser University, School of Computing Science, 2024

An introductory course on programming and some CS-related concepts (e.g., history, problem-solving). Python is the programming language of choice.

This is for reference only. For actual outline refer to the course webpage at Canvas (our LMS). Content is subject to change (plus I often update it). This is the schedule I used for Spring 2024.

Course Description

An elementary introduction to computing science and computer programming, suitable for students with little or no programming background. Students will learn fundamental concepts and terminology of computing science, acquire elementary skills for programming in a high-level language, e.g. Python. The students will be exposed to diverse fields within, and applications of computing science. Topics will include: pseudocode; data types and control structures; fundamental algorithms; recursion; reading and writing files; measuring performance of algorithms; debugging tools; basic terminal navigation using shell commands. Treatment is informal and programming is presented as a problem-solving tool.

Course Objectives

This course introduces students to fundamental concepts of computing science and programming. By the end of the course, students will be familiar with building blocks of a computer program such as variables, arrays, pointers, recursions; as well as higher level concepts such as analysis of algorithms and coding style. Students will gain valuable knowledge and experience by solving problems using computational thinking.

By the end of this course students should be able to:

  • Design and implement solutions to problems using computational thinking and Python
  • Explain, analyze, and compare algorithms in terms of performance
  • Describe and utilize fundamental computing science concepts such as data structures
  • Maintain good coding practice and style

Recommended Textbooks

Think Python - How to Think Like a Computer Scientist (LINK)
Think Python - How to Think Like a Computer Scientist: Interactive Edition (Runestone) (LINK)

Course Schedule

WeekTopicsReadings/Watchings1
1Course intro
  • Logistics, expectations
  • Intro to Python, Coding Environments
Runestone chapters:
  • 1.1-1.5
  • 1.11-1.13
2Build an interactive chatbot! (Part 1)
  • Variables, assignment, input lists
  • Booleans, logic operators, conditionals
  • Datatypes, importing modules
Runestone chapters:
  • 2.1-2.8, 5.1, 9.3, 10.2
  • 7.1-7.5, 2.10
3Build an interactive chatbot! (Part 2)
  • String methods, method chaining
  • More on lists, nested conditionals
  • Basic for-loops
Runestone chapters:
  • 1.7-1.9, 9.5, 9.13, 10.5
  • 4.4, 4.5, 4.7, 2.2, 2.3, 7.6
4Build a recommendation system! (Part 1)
  • More on for-loops
  • Designing solutions, accumulator pattern
  • Dictionaries
Runestone chapters:
  • 2.2, 2.3, 2.7, 2.9-2.11
  • 6.5.1, 9.5.1, 10.3
5Build a recommendation system! (Part 2)
  • File I/O
  • Basic data processing, learning search
Runestone chapters:
  • 9.8, 10.4, 10.6, 10.8, 10.24, 11.1-11.4
  • 9.4, 9.7, 10.7
6Simple graphics & animation (Part 1)
  • Turtle module
  • Functions (fruitful vs non-fruitful)
  • Basic while-loops
Runestone chapters:
  • 4.1-4.3, 4.6-4.9
  • 6.1, 6.4, 6.11
  • 8.3, 8.8
7Reading break-
8Review & Midterm-
9Computer vision & image processing (Part 1)
  • Pixels, image manipulation
  • Lists of lists
Runestone chapters:
  • 8.11 (slightly different from this course, reference only)
  • 10.24
10Computer vision & image processing (Part 2)
  • Imagery modules
  • Nested-loops
Runestone chapters:
  • 5.1-5.3, 5.5
  • 15.1-15.9 (use course materials for main reference), 15.27
  • >
11Under the hood (Part 1)
  • Lists & functions
  • Clones & alias
  • Bits & bytes
  • Recursion
Runestone chapters:
  • 10.10-10.13, 10.16, 10.19, 10.22
  • 16.1, 16.3, 16.5, 16.6
12Internet & big data (Part 1)
  • Searching & sorting algorithms
  • Time complexity
Runestone chapters:
  • 6.3.1, 6.4.1, 6.8, 6.11
13Internet & big data (Part 1 cont’d)
  • Searching & sorting algorithms
  • Time complexity
Runestone chapters:
  • 6.3.1, 6.4.1, 6.8, 6.11
14Internet & big data (Part 2)
  • High-order functions (map, filter, reduce)

Review
External readings (skip the lambda examples):
??Final Exam-

Extras

Brief Intro to Tkinter UI

  1. References in Topics/Readings are for reference only. If there is any topic/concept that is in conflict between class slides and any of these references, what is taught in the classes will be used.