Computer Studies — Grade 12 University Preparation

💻 ICS4U: Computer Science

Programming concepts, data structures, modular design, algorithm analysis, software engineering, and computing in society

110 hours · 5 units · Recommended language: Python (Java optional) · Prerequisite: ICS3U Introduction to Computer Science (Grade 11) or equivalent

Unit 1: Programming Foundations Unit 2: Data Structures Unit 3: Modular Programming & Recursion Unit 4: Algorithms Unit 5: Software Engineering & Society
📚 Curriculum Document 🏁 Final Exam (Cumulative · /100)

Unit 1: Programming Foundations

Python syntax, variables, primitive data types, expressions, input/output, control flow (selection & iteration), and the fundamentals of program tracing

📚 Strand A1 (Data Types) · Strand A2 (Sequence/Selection/Iteration) ⏱️ ~20 hours 📝 5 topics
1.1 — Variables, Data Types, and Expressions
Primitive types (int, float, str, bool); variable assignment; type conversion; operator precedence; basic expression evaluation
# Variable assignment and type conversion name = "Ada" age = 17 gpa = 3.85 is_senior = True # Build a record string with explicit conversions record = name + " (" + str(age) + "): " + str(gpa) print(record) # Ada (17): 3.85
📖Python Variables — Programming with Mosh11:01▶
1.2 — Input, Output, and String Formatting
input(), print(), f-strings, escape sequences, integer vs. float input parsing
# Build an interactive area calculator length = float(input("Length (m): ")) width = float(input("Width (m): ")) area = length * width print(f"Area = {area:.2f} m²")
📖Python Quick Tip: F-Strings — Advanced String Formatting — Corey Schafer12:59▶
1.3 — Selection: if/elif/else and Boolean Logic
Comparison operators, logical and/or/not, truth tables, short-circuit evaluation, the dangling-else problem
# Letter-grade classifier (Ontario Achievement Chart) def letter_grade(percent): if percent >= 80: return "Level 4" elif percent >= 70: return "Level 3" elif percent >= 60: return "Level 2" elif percent >= 50: return "Level 1" else: return "R"
📖Python Conditionals and Booleans — If, Else, and Elif Statements — Corey Schafer17:18▶
1.4 — Iteration: for, while, and Loop Tracing
Counted loops with range(), conditional loops, accumulator pattern, sentinel-controlled loops, off-by-one errors
# Sum of numbers 1..n using accumulator pattern def sum_to(n): total = 0 for i in range(1, n + 1): total += i return total print(sum_to(100)) # 5050 (Gauss)
📖Python Loops and Iterations — For/While Loops — Corey Schafer21:34▶
1.5 — Program Tracing and Desk Checks
Variable trace tables, dry runs, predicting output, the IPO (Input-Process-Output) chart
📖Python Tutorial: Debugging logic errors by hand-tracing your code11:31▶
📖IPO Charts and Structure Charts with Python9:32▶
📊 Unit 1 Assessments
🔄 Practice Quiz (AS) 📋 Diagnostic (FOR) ✅ Unit Test (OF)

Unit 2: Data Structures

1-D and 2-D lists (arrays), dictionaries (maps/records), tuples, strings as sequences, file I/O, classes & objects

📚 Strand A1 (Data Structures) · Strand C1 (Object Modeling) ⏱️ ~25 hours 📝 6 topics
2.1 — 1-D Lists (Arrays): Indexing, Slicing, Mutation
List literal syntax, zero-based indexing, negative indices, slice notation, common methods (.append, .pop, .insert, .remove)
scores = [82, 76, 91, 68, 88] print(scores[0]) # 82 (first) print(scores[-1]) # 88 (last) print(scores[1:4]) # [76, 91, 68] scores.append(95) # mutate in place avg = sum(scores) / len(scores)
📖Python Lists, Tuples, and Sets — Corey Schafer23:43▶
2.2 — 2-D Lists / Multi-Dimensional Arrays
Lists of lists, row/column indexing, nested loops to traverse a grid, building a tic-tac-toe or seating chart
# 3 x 3 game board (None = empty) board = [ [None, "X", None], [None, "O", None], ["X", None, None] ] for row in board: for cell in row: print(cell if cell else ".", end=" ") print()
📖Intro to Nested Lists (2D Lists) — Tech With Tim9:25▶
2.3 — Dictionaries (Maps) and Records
Key-value pairs, lookup vs. linear search, dictionaries as records, nested dictionaries
student = { "name": "Hopper", "id": 100451, "grades": {"ICS4U": 94, "MCV4U": 88} } print(student["grades"]["ICS4U"]) # 94
📖Python Data Structures — Lists, Tuples, Sets & Dictionaries28:18▶
2.4 — Strings as Sequences
Strings are immutable sequences; common methods (.split, .join, .strip, .lower, .replace, .find); slicing and reversal
📖Python Strings: Working with Textual Data — Corey Schafer21:09▶
2.5 — File I/O: Reading and Writing Text Files
open(), context managers (with statement), reading lines, writing CSV-like data
# Read a roster file, output the average mark with open("roster.csv") as f: total, count = 0, 0 for line in f: name, mark = line.strip().split(",") total += int(mark) count += 1 print(f"Class average: {total/count:.1f}")
📖Python File Objects — Reading and Writing to Files — Corey Schafer24:33▶
2.6 — Classes and Objects (Introduction to OOP)
Defining a class, attributes, methods, the __init__ constructor, encapsulation; objects vs. records
class Student: def __init__(self, name, grade): self.name = name self.grade = grade def promote(self): self.grade += 1 def __str__(self): return f"{self.name} (Grade {self.grade})" s = Student("Turing", 11) s.promote() print(s) # Turing (Grade 12)
📖Python OOP — Classes and Instances — Corey Schafer15:24▶
📊 Unit 2 Assessments
🔄 Practice Quiz (AS) 📋 Diagnostic (FOR) ✅ Unit Test (OF)

Unit 3: Modular Programming & Recursion

Functions, parameters (positional/keyword/default), return values, scope (local/global), top-down design, recursion, the call stack

📚 Strand A2 · Strand C1 (Modular Structure) ⏱️ ~22 hours 📝 5 topics
3.1 — Defining and Calling Functions
Function definition, parameters vs. arguments, return values, docstrings, the DRY principle
def celsius_to_fahrenheit(c): """Convert °C to °F.""" return c * 9/5 + 32 def describe_temp(c): f = celsius_to_fahrenheit(c) return f"{c}°C = {f:.1f}°F"
📖Python Functions — Definitions, Arguments, and Return Values — Corey Schafer21:48▶
3.2 — Parameters: Positional, Keyword, Default, and *args
Default arguments, named arguments, variable-length argument lists, pass-by-object-reference behavior
📖Let's Learn Python — *Args and **Kwargs — Corey Schafer8:24▶
3.3 — Variable Scope and the LEGB Rule
Local, Enclosing, Global, Built-in scope; the global keyword; why mutable globals are dangerous
x = 10 # global def outer(): x = 5 # enclosing (relative to inner) def inner(): x = 1 # local print(x) # 1 inner() print(x) # 5 outer() print(x) # 10
📖Python Variable Scope — LEGB Rule and global/nonlocal — Corey Schafer19:31▶
3.4 — Recursion: Base Cases and Recursive Cases
Designing the base case, the recursive call, the call stack, and the equivalence with iteration
def factorial(n): if n <= 1: # base case return 1 return n * factorial(n-1) # recursive case def fib(n): if n < 2: return n return fib(n-1) + fib(n-2)
📖Recursion for Python Beginners with Recursive Function Examples14:19▶
3.5 — Top-Down Design and Stepwise Refinement
Decompose a problem into modules; structure charts; bottom-up integration; library reuse
📖Stepwise Refinement, Decomposition, Modules, Top-Down Design12:25▶
📊 Unit 3 Assessments
🔄 Practice Quiz (AS) 📋 Diagnostic (FOR) ✅ Unit Test (OF)

Unit 4: Algorithms — Searching, Sorting, and Complexity

Linear & binary search, classical sorts (bubble, insertion, selection, merge, quicksort), Big-O notation, algorithm comparison

📚 Strand A3 · Strand B3 (Standard Algorithms) ⏱️ ~25 hours 📝 5 topics
4.1 — Linear Search and Binary Search
Sequential lookup vs. divide-and-conquer; precondition: binary search requires a sorted list; off-by-one issues with bounds
def binary_search(arr, target): lo, hi = 0, len(arr) - 1 while lo <= hi: mid = (lo + hi) // 2 if arr[mid] == target: return mid elif arr[mid] < target: lo = mid + 1 else: hi = mid - 1 return -1 # not found
📖Linear & Binary Search Code | Big O Notation11:35▶
4.2 — Bubble, Insertion, and Selection Sort
The three classical O(n²) sorts; correctness invariants; in-place vs. stable sort
def insertion_sort(a): for i in range(1, len(a)): key = a[i] j = i - 1 while j >= 0 and a[j] > key: a[j+1] = a[j] j -= 1 a[j+1] = key return a
📖Bubble Sort, Insertion Sort, Merge Sort & Big O Notation22:14▶
4.3 — Merge Sort and Quicksort (Divide & Conquer)
Recursive sort algorithms; merge step; pivot selection; average vs. worst-case behavior
def merge_sort(a): if len(a) <= 1: return a mid = len(a) // 2 left = merge_sort(a[:mid]) right = merge_sort(a[mid:]) # merge out, i, j = [], 0, 0 while i < len(left) and j < len(right): if left[i] <= right[j]: out.append(left[i]); i += 1 else: out.append(right[j]); j += 1 out += left[i:] + right[j:] return out
📖Learn Merge Sort in 13 minutes — Bro Code13:45▶
📖Learn Quick Sort in 13 minutes — Bro Code13:01▶
4.4 — Big-O Notation and Algorithm Efficiency
O(1), O(log n), O(n), O(n log n), O(n²), O(2ⁿ); growth rates; counting basic operations
📖Learn Big O Notation in 6 Minutes — Bro Code6:25▶
📖Big O Notation & Time Complexity Analysis Tutorial — Tech With Tim28:44▶
4.5 — Algorithm Selection and Trade-offs
Choose the right algorithm: small lists, nearly-sorted data, memory constraints, stability requirements
📖15 Sorting Algorithms in 6 Minutes (Visual Comparison)5:51▶
📊 Unit 4 Assessments
🔄 Practice Quiz (AS) 📋 Diagnostic (FOR) ✅ Unit Test (OF)

Unit 5: Software Engineering & Computing in Society

Testing & debugging, version control, the software-development life cycle, ethics, AI/ML overview, careers, environmental impact, history of computing

📚 Strand B (Software Development) · Strand C2 · Strand D (Topics in CS) ⏱️ ~18 hours 📝 6 topics
5.1 — Testing & Debugging Strategies
Unit tests, boundary cases, regression testing, debugger basics, the rubber-duck method, common bug types (off-by-one, type, scope)
import unittest def divide(a, b): if b == 0: raise ValueError("divide by zero") return a / b class TestDivide(unittest.TestCase): def test_basic(self): self.assertEqual(divide(10, 2), 5) def test_zero(self): self.assertRaises(ValueError, divide, 10, 0)
📖Python Tutorial: Unit Testing Your Code with the unittest Module — Corey Schafer22:30▶
5.2 — Version Control with Git (Essentials)
Repos, commits, branches, merges, pull requests, .gitignore; why version control matters in collaborative software
📖Git Tutorial for Beginners: Learn Git in 1 Hour — Programming with Mosh1:09:13▶
5.3 — The Software Development Life Cycle & Maintainability
Requirements gathering, design, implement, test, deploy, maintain; commenting; naming conventions (PEP 8); code reviews
📖Software Engineering — Crash Course Computer Science #1611:51▶
5.4 — Emerging Technologies: AI, Machine Learning, Quantum Computing
High-level overview of how supervised learning, neural networks, and large-language-models work; introduction to qubits and quantum advantage
📖Machine Learning & Artificial Intelligence — Crash Course CS #3411:51▶
5.5 — Ethical & Environmental Issues in Computing
Privacy, algorithmic bias, intellectual property, e-waste, energy footprint of data centres & AI training, ethical AI design
📖The Psychology of Computing — Crash Course CS #3811:38▶
5.6 — History of Computing & Career Pathways
From Babbage and Lovelace to modern cloud computing; CS-related careers in Canada (software dev, data science, security, ML, robotics, game dev); Canadian post-secondary CS programs
📖Early Computing — Crash Course Computer Science #111:53▶
📖I Ranked Every Tech Career Path (Who Wins?) — Tech With Tim14:26▶
📊 Unit 5 Assessments
🔄 Practice Quiz (AS) 📋 Diagnostic (FOR) ✅ Unit Test (OF)

🏁 Cumulative Final Exam

3-hour, /100, cumulative across all 5 units · Worth up to 30% of final grade

📚 K/U 25 · T 25 · C 25 · A 25⏱️ 3 hours📝 Aligned with Growing Success (2010)
🏁 Open Final Exam 📚 Curriculum Document