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

Week 3 — Module Framing · Input / Output & Strings

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 3 of 16 · Fall 2026 · in-person, two 75-minute coding-along studio sessions
Objective covered: Objective 2 — Use variables, data types, expressions, and input/output — including reading input and working with strings (indexing, slicing, f-strings).

This file holds two pieces: (A) the Module 3 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 3 meeting Tue Sep 15 and Thu Sep 17, a Coding Lab that same week, and end-of-week work due Sunday Sep 20, 11:59 p.m. Adjust the day-of-week and times to match your section.


(A) Module 3 Overview — Start Here

Welcome to Week 3: Input / Output & Strings

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 computed with values you typed into the code. This week your programs start talking to a person: they ask a question with input(), take whatever the user types, and build a personalized response out of it. That single change — programs that read input — opens the door to almost everything interesting you'll write. Along the way we get serious about strings: how to pull a single character out (s[0], s[-1]), how to slice out a chunk (s[1:4]), how long a string is (len(s)), and how to drop values neatly into text with f-strings (f"Hi {name}"). The one trap that catches everybody this week — and we'll hit it head-on — is that input() always hands you a string, even when the user types 5. If you forget that, your "math" silently becomes text-joining or crashes outright.

The week's big question

"How does a program take what a person types and turn it into a useful, personalized response?"

By Friday you'll be able to read input with input(), know why input() always returns a str (and how int(input()) fixes the classic bug), pull characters and slices out of a string, build output with f-strings, and predict an IndexError before it happens — checking every prediction by running it.

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.

  • [ ] Read input and build output — use input() to get text from the user and an f-string (f"Hi {name}") to weave it into a response.
  • [ ] Explain why input() returns a str — and fix the classic bug with int(input()) when you need to do math.
  • [ ] Index and slice stringss[0], s[-1], s[1:4], s[:3], s[2:], s[::2] — and know that the stop is exclusive (the off-by-one that bites everyone).
  • [ ] Read an IndexError — recognize when an index is past the end of a string, and know len(s) tells you how far you can go.

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 + skim the linked references Read (ungraded prep) Before Thu Sep 17
2 Skim the slides (Deck 3) and the Week 3 lecture outline Prep (ungraded) Alongside class
3 Lecture Tutorial 3 — work through input(), the "always a string" rule, indexing, slicing, and f-strings with one approved chatbot (Gemini, Claude, or ChatGPT), then submit the conversation share link Lecture Tutorial · graded (5% group) Sun Sep 20, 11:59 p.m.
4 Practice exercises — low-stakes reps to lock in the ideas Practice · ungraded Sun Sep 20 (recommended)
5 Coding Lab 3 — "Ask, Slice, Fix" — write an f-string greeting from input, fill in a predict-then-run table of index/slice expressions, and fix an input()-returns-a-string bug — then have the AI trace a slice so you can catch its off-by-one Coding Lab · graded (Coding Labs, 15% group) · 50 pts Sun Sep 20, 11:59 p.m.
6 Quiz 3 — covers input(), the "always a string" rule, indexing & slicing, len(), f-strings, and an IndexError Quiz · graded (Quizzes, 10% group) Sun Sep 20, 11:59 p.m.
7 Discussion 3 — "Decompose a Validator" — break down, step by step, how a program decides a username or password is valid, then debate how far a program should trust raw user input — in a dialogue 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 Sep 18; replies Sun Sep 20
8 Assignment 3 — "Input, Slice & Fix" — build a personalized message from input, slice parts out of a string, predict a slicing expression, and fix an input() bug — coached and scored by one approved chatbot Assignment · graded (Assignments, 15% group) · 100 pts Sun Sep 20, 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. Chatbots are famous for mis-tracing slices — they slip on the exclusive stop and tell you "PYTHON"[1:4] is YTHO or YT. Running it (the answer is YTH) is how you catch them, in the tutorial, the assignment, and the lab.

How to succeed this week

  • Run everything — especially slices. When you're unsure what a slice returns, don't argue with yourself: paste it into the editor and run it. The exclusive stop is the thing people get wrong, and one run settles it.
  • Two hooks to memorize. "input() always gives you a string — convert it with int() if you need to do math." And "a slice s[a:b] includes a, excludes b."
  • Count from zero — and from the right. s[0] is the first character; s[-1] is the last. When you reach for "the last letter," reach for -1, not len(s).
  • len(s) is your guardrail. A string of length 6 has valid indices 0 through 5. Ask for s[6] and you get an IndexError. When in doubt, print len(s) first.
  • Treat the chatbot as a smart intern, not an oracle. It drafts; you run the code and check — and slices are exactly where it stumbles.

You don't need any setup for this week — the Python environment runs in your browser, nothing to install. Come to class ready to make your programs ask a question and answer it. See you Tuesday.


(B) Welcome Announcement — Module 3

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

Subject: Week 3 — this week your programs start talking to people 💬

Hi everyone,

Up to now, your programs only knew what you hard-coded into them. This week they learn to ask. With one new tool — input() — your program can stop, wait for a person to type something, and build a personalized reply out of it. We'll pair that with strings: pulling out a character (s[0], s[-1]), slicing out a piece (s[1:4]), measuring length (len(s)), and dropping values into text with f-strings (f"Hi {name}").

This week — Input / Output & Strings — we tackle the big question: How does a program take what a person types and turn it into a useful, personalized response? By Friday you'll read input, build output, slice strings, and predict an IndexError before it happens.

Three things not to miss:
1. Lecture Tutorial 3 — work through the week's ideas with one approved chatbot and submit the share link. Watch it carefully on slices — chatbots love to miscount the exclusive stop. Due Sun Sep 20.
2. Coding Lab 3 ("Ask, Slice, Fix"), Quiz 3, Discussion 3, and Assignment 3 also close Sun Sep 20 — the lab is where you write your own interactive program, so start early.
3. Open the Start Here page first — it lays out everything in order with due dates.

The one rule that will save you all week: input() always gives you back a string — even if the person types 25. If you need to do math with it, wrap it in int(...). Forget that, and "5" + 3-style bugs are waiting. As always, the source of truth is the same: run the code and read what Python actually prints.

Bring your curiosity (and a willingness to be wrong about what "PYTHON"[1:4] prints) to class on Tuesday.

See you soon,
Prof. Okafor


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