Course Schedule

Guide roadmap and active milestone tracking. Click the circle next to any week number to toggle completion!

Wk Topic Details Due State Resources & Solutions
1 Intro to terminal & local Python coordination Completed
2 Built-in types: String, Integer, Float, list, tuple Completed
3 Built-in types: dict, Functions: def, *args, **kwargs Completed
4 Conditionals & Branching logic: if, elif, else Active Week 📝 HW1 released
5 Loops & Iteration: for and while loops HW1 due
6 Nested loops, break, continue, enumerate
7 Comprehensions: List, dictionary, and set structures 📝 HW2 released
8 File I/O: open and with, Exceptions: try/except HW2 due
9 Command-line Arguments: sys.argv, argparse Midterm
10 Scripts, Modules & Packages: import, as, __main__ 📝 HW3 released
11 General Programming: Language model backend HW3 due 📝 HW4 released
12 Object Oriented Programming (OOP) HW4 due 📝 HW4.5 released
13 General Programming: business application program 2 HW4.5 due 📝 HW5 released
14 Advanced logical optimization & trace debugging
15 Comprehensive course review & trace practice HW5 due
16 Final exams / business system submissions

Upcoming Exam Review

Review solutions below or click keys inline inside the Course Schedule table to expand them instantly.

Exam Keys

Collapsible detailed answer sets.

Practice Final

PDF
Practice Final Key

1) Multiple Choice

  1. 1.1 # 2. 3
  2. 1.2 # 1. [n**2 for n in nums]
  3. 1.3 # 1. It automatically closes the file when the block is done
  4. 1.4 # 2. Python runs the matching except block
  5. 1.5 # 2. import math
  6. 1.6 # 2. Skips iteration
  7. 1.7 # 4. 5
  8. 1.8 # 1. x > 10 and x < 20

2) True/False

  1. 2.1 True
  2. 2.2 True
  3. 2.3 True
  4. 2.4 True
  5. 2.5 True
  6. 2.6 True
  7. 2.7 False
  8. 2.8 False

3) Code Tracing

  1. 3.1
    [4, 8]
  2. 3.2
    2
  3. 3.3
    15
  4. 3.4
    60

4) Open Ended

4.1

def positiveSquares(L):
    return [x**2 for x in L if x > 0]

4.2

def countLines(filename):
    count = 0
    with open(filename) as f:
        for line in f:
            count += 1
    return count

4.3

def safeInt(s):
    try:
        return int(s)
    except ValueError:
        return None

Spring 2026 Midterm

PDF
Spring 2026 Midterm Key

1) Multiple Choice

  1. 1.1 # 2. 4
  2. 1.2 # 1. ababab
  3. 1.3 # 2. [1,2,3]
  4. 1.4 # 2. ==
  5. 1.5 # 2. Exits loop
  6. 1.6 # 2. 0,1,2
  7. 1.7 # 3. Index-value pairs
  8. 1.8 # 3. <class 'tuple'>

2) True/False

  1. 2.1 True
  2. 2.2 True
  3. 2.3 False
  4. 2.4 True
  5. 2.5 False
  6. 2.6 False
  7. 2.7 True
  8. 2.8 True

3) Code Tracing

  1. 3.1
    1, 2, 3
  2. 3.2
    1, 3, 5
  3. 3.3
    9
  4. 3.4
    10

4) Open-Ended

4.1

def countGreater(L, k):
    count = 0
    for x in L:
        if x > k:
            count += 1
    return count

4.2

def sumList(L):
    total = 0
    for x in L:
        total += x
    return total

4.3

def reverseList(L):
    return L[::-1]

Practice Midterm

PDF
Practice Midterm Key

1) Multiple Choice

  1. 1.1 # 3. 5
  2. 1.2 # 2. (1,2,3)
  3. 1.3 # 2. A B C
  4. 1.4 # 3. Membership check
  5. 1.5 # 3. while
  6. 1.6 # 2. 4
  7. 1.7 # 2. {1:2,3:4}
  8. 1.8 # 3. Skips iteration

2) True/False

  1. 2.1 True
  2. 2.2 False
  3. 2.3 True
  4. 2.4 True
  5. 2.5 True
  6. 2.6 True
  7. 2.7 True
  8. 2.8 True

3) Code Tracing

  1. 3.1
    1, 2, 3
  2. 3.2
    10
  3. 3.3
    7
  4. 3.4
    10, 30

4) Open-Ended

4.1

def countOdd(L):
    count = 0
    for x in L:
        if x % 2 == 1:
            count += 1
    return count

4.2

def maxDiff(L):
    return max(L) - min(L)

4.3

def sumIndices(L):
    total = 0
    for i in range(len(L)):
        if i % 2 == 0:
            total += L[i]
    return total

Fall 2025 Midterm

PDF
Fall 2025 Midterm Key

1) Multiple Choice

  1. 1.1 # 1. set(L)
  2. 1.2 # 3. Reverse
  3. 1.3 # 1. list comprehension
  4. 1.4 Index first, value second
  5. 1.5 # 3. "a"
  6. 1.6 # 2. Skips remaining

2) True/False

  1. 2.1 False
  2. 2.2 True
  3. 2.3 False
  4. 2.4 True

3) Short Traces

  1. 3.11
  2. 3.2[1, 2, 3, [4, 5]]
  3. 3.35
  4. 3.44

4) Open-Ended

4.1

def elements_at_odd_indices(L):
    return [L[i] for i in range(len(L)) if i % 2 == 1]

4.2

total = 0
with open("nums.txt") as f:
    lines = f.readlines()
    for line in lines:
        total += int(line)
    avg = total / len(lines)
    print(avg)

4.3

cubes = [n**3 for n in nums]