Week 2 — Module Framing · Variables, Data Types & Expressions
Course: Introduction to Computer Science — CS1 / Programming Fundamentals in Python (CSCI 1101) · Silver Oak University (fictional sample) · Prof. Okafor
Module: Week 2 of 16 · Fall 2026 · in-person, two 75-minute coding-along studio sessions
Objective covered: Objective 2 — Use variables, the core data types, and expressions to compute and store values; trace and debug what they produce.
This file holds two pieces: (A) the Module 2 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 2 meeting Tue Sep 8 and Thu Sep 10, a Coding Lab that same week, and end-of-week work due Sunday Sep 13, 11:59 p.m. (Labor Day is Mon Sep 7 — no class.) Adjust the day-of-week and times to match your section.
(A) Module 2 Overview — Start Here
Welcome to Week 2: Variables, Data Types & Expressions
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.
Last week your programs could only say fixed things. This week we give them memory. A variable is a named box that holds a value, so a program can store a number, do math with it, and reuse it. You'll meet Python's four everyday types — int, float, str, bool — learn how Python does arithmetic with operator precedence, and run into the surprise that trips up nearly everyone: / always gives a decimal (so 10 / 2 is 5.0, not 5). You'll also learn the two division cousins — // (floor) and % (remainder) — and how to convert between types so int("5") + 3 works while "5" + 3 crashes. The habit from Week 1 holds: don't guess what an expression gives — run it and read what Python actually prints.
The week's big question
"How does a program remember a value, and what exactly happens when it does math with it?"
By Friday you'll be able to store values in variables, name the type of any value with type(), predict the result of an arithmetic expression (precedence, / vs // vs %), convert between types, and fix the classic "5" + 3 type error.
By the end of this week, you can…
Use this as a checklist. If you can do all four, you're ready for the quiz.
- [ ] Use variables — store a value with
=, reuse it, and reassign it; and tell why=is assignment, not comparison. - [ ] Name the four core types —
int,float,str,bool— and check any value withtype(). - [ ] Evaluate expressions — apply operator precedence, and predict
/(always a float),//(floor division), and%(remainder), then run to confirm. - [ ] Convert types and fix a type bug — use
int(),float(),str(), and fix the"5" + 3TypeErrorwithint(...).
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 Sep 10 |
| 2 | Skim the slides (Deck 2) and the Week 2 lecture outline | Prep (ungraded) | Alongside class |
| 3 | Lecture Tutorial 2 — work through variables, the four types, type(), precedence, / vs // vs %, and type conversion with one approved chatbot (Gemini, Claude, or ChatGPT), then submit the conversation share link |
Lecture Tutorial · graded (5% group) | Sun Sep 13, 11:59 p.m. |
| 4 | Practice exercises — low-stakes reps to lock in the ideas | Practice · ungraded | Sun Sep 13 (recommended) |
| 5 | Coding Lab 2 — "Boxes, Math & a Sneaky Decimal" — write programs with variables, build a predict-then-run expression table (incl. /, //, %, **), fix a type/assignment bug, and visualize a variable swap in Python Tutor — then catch the AI claiming 10 / 2 is 5 |
Coding Lab · graded (Coding Labs, 15% group) · 50 pts | Sun Sep 13, 11:59 p.m. |
| 6 | Quiz 2 — covers variables, types, type(), precedence, / vs // vs %, and type conversion |
Quiz · graded (Quizzes, 10% group) | Sun Sep 13, 11:59 p.m. |
| 7 | Discussion 2 — "Naming & Readability" — explain in plain language what a variable is, then debate good vs. bad variable names (x vs total_price) in a dialogue with one approved chatbot, post the AI summary + your chat link, and reply to two classmates |
Discussion · graded (Discussions, 10% group) | Initial post Fri Sep 11; replies Sun Sep 13 |
| 8 | Assignment 2 — "Compute, Convert, Fix" — write a program with variables, predict a precedence/division expression, convert types, and fix a "5"+3 bug, coached and scored by one approved chatbot |
Assignment · graded (Assignments, 15% group) · 100 pts | Sun Sep 13, 11:59 p.m. |
Heads-up on the AI tools: you'll keep using a chatbot as a pair-programmer — and then check its work by running the code. This week's classic AI slip is the division one: a chatbot will confidently tell you 10 / 2 prints 5. Python prints 5.0. Catching that — by running it — is the point, in the tutorial, the assignment, and the lab.
How to succeed this week
- Run everything. Type the example into the online Python editor, press Run, and read the output. Especially the division ones —
/,//, and%are easy to mix up until you see them run. - Two tiny hooks to memorize. "
=means put this value in the box, not is it equal?." And "slash makes a float:/always gives a decimal; use//when you want a whole number." - Predict, then check. Before you run
print(7 / 2)orprint(7 // 2)orprint(7 % 2), say out loud what you think each prints. Then run all three. The gaps are the lesson. - Read the type in the error. When code crashes with a
TypeError, the message names the types involved (strandint). That's the computer telling you a value is the wrong type — convert it. - Treat the chatbot as a smart intern, not an oracle. It drafts; you run the code and check. This week, double-check anything it says about
/returning a whole number.
You don't need any setup for this week — the Python environment runs in your browser, nothing to install. Come to class ready to give your programs some memory. See you Tuesday.
(B) Welcome Announcement — Module 2
Release setting: post on the module's start day (offset = 0 days), i.e., Tue Sep 8, 2026 — not before. If your platform won't preserve the scheduled date on import, post this as a draft labeled "Release: Tue Sep 8."
Subject: Week 2 — we give your programs memory (and meet a sneaky decimal) 🧠
Hi everyone — great start last week. You wrote and ran your first programs; this week we make them remember.
This week — Variables, Data Types & Expressions — we tackle the big question: How does a program remember a value, and what exactly happens when it does math with it? You'll store values in variables, meet Python's four everyday types (int, float, str, bool), learn how Python evaluates expressions with operator precedence, and run head-first into the surprise that catches almost everyone: 10 / 2 prints 5.0, not 5 — because / always makes a decimal. We'll also meet its two cousins, // (whole-number division) and % (the remainder), and learn to convert types so int("5") + 3 works.
Three things not to miss:
1. Lecture Tutorial 2 — work through variables, the four types, type(), precedence, and / vs // vs % 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 Sep 13.
2. Coding Lab 2 ("Boxes, Math & a Sneaky Decimal"), Quiz 2, Discussion 2, and Assignment 2 also close Sun Sep 13 — the lab is where you build the predict-then-run expression table, so start early.
3. Open the Start Here page first — it lays out everything in order with due dates.
One habit to keep from day one: never trust an output you didn't run. This week a chatbot — or your own first guess — will tell you 10 / 2 is 5. Run it: Python says 5.0. The source of truth is always the same — run the code and read what Python actually prints.
A scheduling note: Monday, Sep 7 is Labor Day — no class. We meet Tuesday and Thursday as usual.
Bring your curiosity (and a willingness to be surprised by print(10 / 2)) to class on Tuesday.
See you soon,
Prof. Okafor
~ Prof. Okafor's edition · Fall 2026 · built with thecoursemaker.com