Back to the Introduction to Computer Science outline The Course Maker
Introduction to Computer Science outline
Week 9 · Module overview

Week 9 — Module Framing · Lists

Introduction to Computer Science · CSCI 1101 Fall 2026 · Prof. Okafor Fictional sample

Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Module: Week 9 of 16 · Fall 2026 · in-person, two 75-minute coding-along studio sessions
Objective covered: Objective 6 — Use Python's core collections; this week: create, index, slice, mutate, and iterate lists, and reason about aliasing vs. copying.

This file holds two pieces: (A) the Module 9 Overview page ("Start Here") and (B) the Welcome Announcement that drips out when the module opens. Dates below assume a Tuesday/Thursday pattern with Week 9 meeting Tue Oct 27 and Thu Oct 29, a Coding Lab that same week, and end-of-week work due Sunday Nov 1, 11:59 p.m. Adjust the day-of-week and times to match your section.


(A) Module 9 Overview — Start Here

Welcome to Week 9: Lists

This is your home base for the week. Read it first, then work the checklist below from top to bottom. Everything you need is linked inside the module.

Up to now, every variable has held one value — a number, a string, a Boolean. This week your programs get their first collection: the list, an ordered, changeable container that holds many values under a single name. Lists are the workhorse of Python — a list of scores, a to-do list, a list of names — and almost every real program is full of them. You already know more than you think: a list is indexed and sliced exactly like a string, with the same exclusive-stop rule. The brand-new ideas are that lists can change (they're mutablenums[0] = 9 rewrites a slot in place) and that two names can secretly point at the same list (aliasing), which is the trap of the week. As always, the one habit that carries everything: don't guess what code does — run it and read what Python actually prints.

The week's big question

"How do I store and change a whole collection of values under one name — and what happens when two names point at the same list?"

By Friday you'll create lists, pull items out by index and slice, change them with [i] = and methods (append, pop, remove, insert, sort), loop over them, and — the headline — explain why b = a makes b and a the same list while b = a[:] makes a separate copy.

By the end of this week, you can…

Use this as a checklist. If you can do all five, you're ready for the quiz.

  • [ ] Create and read a list — write [...], get the length with len, and pull items with indexing (nums[0], nums[-1]) and slicing (nums[1:3], exclusive stop — same rules as strings).
  • [ ] Mutate a list — change a slot with nums[0] = 9, and add/remove with append, insert, pop, remove, and sort (run-verify every effect).
  • [ ] Iterate a list — use a for loop to total, average, or find the max — and recognize the mutate-while-iterating gotcha (removing items inside the loop skips elements).
  • [ ] Reason about aliasing vs. copying — explain why b = a ties two names to one list (changing b changes a), while b = a[:] or list(a) makes an independent copy.
  • [ ] Test membership — use in to ask whether a value is in a list, and read an IndexError when you reach past the end.

What's due this week, and when

Work these in order — each one gets you ready for the next.

# Do this Type Due
1 Read the week's readings + watch the linked videos Read / watch (ungraded prep) Before Thu Oct 29
2 Skim the slides (Deck 9) and the Week 9 lecture outline Prep (ungraded) Alongside class
3 Lecture Tutorial 9 — work through creating, indexing/slicing, mutating, iterating, and aliasing vs. copying with one approved chatbot (Gemini, Claude, or ChatGPT), then submit the conversation share link Lecture Tutorial · graded (5% group) Sun Nov 1, 11:59 p.m.
4 Practice exercises — low-stakes reps to lock in the ideas Practice · ungraded Sun Nov 1 (recommended)
5 Coding Lab 9 — "Build It, Mutate It, Alias It" — build and change a list with methods, run a predict-then-run table of operations and slices, fix an aliasing/mutate-while-iterating bug, and watch b = a alias in Python Tutor — then catch the AI assuming b = a is a copy Coding Lab · graded (Coding Labs, 15% group) · 50 pts Sun Nov 1, 11:59 p.m.
6 Quiz 9 — covers list operations, methods, slicing, aliasing, and debugging (predict-the-output + matching) Quiz · graded (Quizzes, 10% group) Sun Nov 1, 11:59 p.m.
7 Discussion 9 — "Explain a List (and the Aliasing Trap)" — explain a list to a non-programmer, then argue whether Python's "two names, one list" behavior is a helpful feature or a dangerous trap, with a concrete example — worked out with one approved chatbot, then post the AI summary + your chat link and reply to two classmates Discussion · graded (Discussions, 10% group) Initial post Fri Oct 30; replies Sun Nov 1
8 Assignment 9 — "Working With Lists" — track scores and find the max/average by iterating, predict list output, trace an aliasing case, and fix a mutation/IndexError bug, coached and scored by one approved chatbot Assignment · graded (Assignments, 15% group) · 100 pts Sun Nov 1, 11:59 p.m.

Heads-up on the AI tools: you'll use a chatbot as a pair-programmer to draft and explain — and then you check its work by running the code. This week chatbots have a favorite blind spot: they routinely assume b = a makes a copy and tell you changing b won't touch a. Run it and you'll see both names change — catching that is the point, in the tutorial, the assignment, and the lab.

How to succeed this week

  • Run everything. Open the online Python editor, build a list, and watch what each method does to it. Every single time.
  • Two tiny hooks to memorize. "b = a is two names for one list; b = a[:] is a real copy." And "Slicing stops before the second number — same as strings."
  • Predict, then check. Before you run a sequence of list operations, say out loud what the list will contain. Then run it. a = [1, 2]; b = a; b.append(3); print(a) is where most people are wrong the first time — it prints [1, 2, 3].
  • Don't mutate a list while you loop over it. Removing items inside a for loop makes Python skip elements. We'll show exactly why, and the two clean fixes (loop over a copy, or build a new list).
  • Treat the chatbot as a smart intern, not an oracle. It drafts; you run the code and check — especially anything it claims about b = a.

You don't need any setup for this week — the Python environment runs in your browser, nothing to install. Come to class ready to build and break some lists. See you Tuesday.


(B) Welcome Announcement — Module 9

Release setting: post on the module's start day (offset = 0 days), i.e., Tue Oct 27, 2026 — not before. If your platform won't preserve the scheduled date on import, post this as a draft labeled "Release: Tue Oct 27."

Subject: Week 9 — your programs get their first collection: the list 📋

Hi everyone,

Big week: until now every variable held exactly one value. This week your programs learn to hold many values under a single name with Python's most-used collection — the list. A list of scores, a to-do list, a list of names: lists are everywhere in real code, and you're about to make them dance.

This week — Lists — we tackle the big question: How do I store and change a whole collection of values under one name — and what happens when two names point at the same list? By Friday you'll create lists, index and slice them (exactly like strings — same exclusive-stop rule), change them in place and with methods like append and pop, loop over them to total or find a max, and meet the trap of the week head-on: aliasing.

Three things not to miss:
1. Lecture Tutorial 9 — work through lists with one approved chatbot (Gemini, Claude, or ChatGPT) and submit the share link. You'll use it as a pair-programmer — and catch its mistakes by running the code. Due Sun Nov 1.
2. Coding Lab 9 ("Build It, Mutate It, Alias It"), Quiz 9, Discussion 9, and Assignment 9 also close Sun Nov 1 — the lab is where you'll watch b = a alias in Python Tutor, so start early.
3. Open the Start Here page first — it lays out everything in order with due dates.

One habit to carry from earlier weeks: never trust an output you didn't run. This week a chatbot — or your own first guess — will confidently tell you that b = a; b.append(3) leaves a unchanged. It doesn't: both names point to one list, and both change. In this course, the source of truth is always the same: run the code and read what Python actually prints.

Bring your curiosity (and a willingness to be wrong about a = [1, 2]; b = a; b.append(3); print(a)) to class on Tuesday.

See you soon,
Prof. Okafor


~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com