Unit 1 – Teachers Guide
Unit 1 ยท Building Blocks of Python
Your day-to-day companion for delivering Unit 1 โ pacing, standards, lesson plans, misconceptions, differentiation, and a Python error appendix. Designed so a substitute could pick up tomorrow's lesson and run it.
๐ Welcome โ How to Use This Guide
This Teacher's Guide is your day-to-day companion for delivering Unit 1 of the Code Quest curriculum. It's designed for new and experienced CS teachers alike โ no programming background required to use it effectively. Every lesson plan stands on its own; if a substitute teacher takes over for a day, they should be able to pick up the next lesson and run it.
What this guide contains
- A pacing guide showing how Unit 1 maps to roughly 6โ8 class periods, with flex days built in for review and the final project.
- A standards & exam crosswalk showing exactly which Florida CTE standards and Coding Fundamentals exam objectives each lesson addresses.
- A unit vocabulary glossary with all 18 key terms students will encounter in Unit 1.
- Five detailed lesson plans (one per lesson), each using the same 7-section format.
- An appendix with the most common Python error messages students will see in Unit 1, and how to help them fix each one.
How each lesson plan is structured
Every lesson plan in this guide uses the same 7-section format so you can find what you need quickly:
- At-a-Glance โ objective, time, materials, vocabulary, and a quick-reference standards box
- Lesson Flow โ a suggested 45-minute breakdown: warm-up, instruction, guided practice, lab, exit ticket
- Watch For โ the 2โ3 most common student misconceptions, with how to address each in real time
- Differentiation โ what to do for early finishers and what to do for struggling students
- Discussion Prompts โ questions to spark whole-class conversation
- Real-World Connections โ how to answer the inevitable "why does this matter?" question
- Lesson-Specific Vocabulary โ terms introduced or reinforced in that lesson
How to read this in conjunction with the student lessons
Each Code Quest lesson is a self-contained HTML page that students work through at their own pace. This guide doesn't replace those lessons โ it equips you to teach alongside them. The expected workflow:
- Before class: read this lesson plan (5โ10 min) and skim the student HTML lesson
- During class: follow the lesson flow; the student HTML is the textbook + lab
- After class: use the companion Answer Key to quickly grade Knowledge Checks and labs
๐บ๏ธ Unit 1 Overview
The big picture
Unit 1 introduces the four building blocks every Python program is made of: variables, data types, operators, and conditionals. Students start with no coding experience and end the unit having built a complete interactive Mad Libs game from scratch. Every lesson adds one new building block; the final lesson combines all four into one project.
What students learn
- Create variables using the assignment operator and follow Python's variable naming rules
- Identify and use the four core data types: integer, string, Boolean, and float
- Apply math operators (
+,โ,ร,/,**,%) and comparison operators (==,!=,>,<,>=,<=) - Distinguish between
=(assignment) and==(comparison) โ the most common beginner pitfall - Write conditional statements using
if,elif, andelsewith correct indentation and colons - Use
input()to collect information from a user, and f-strings to display results - Read, trace, and predict the output of simple Python programs
- Combine all four building blocks into a complete working program (Mad Libs capstone)
Prerequisites
None. This is the first unit of the course and assumes students have never written code before. Comfort with basic algebra (substituting values into expressions) is helpful but not required.
What comes next
Unit 2 introduces loops (for and while), which let programs repeat actions. Unit 2 builds directly on the if/else logic from Unit 1 Lesson 4. Students who have a shaky grasp of indentation in Unit 1 will struggle in Unit 2 โ so it's worth slowing down on Lesson 4 if needed.
Materials you'll need
- Computers with web browser access (one per student, or pairs)
- Knowledge Pillars CodeSkills Lab access (where students write and run code)
- Projector or large screen for live coding demos
- This Teacher's Guide and the companion Answer Key
- Optional: printed copies of Lesson 1's variable naming rules โ useful as a tape-to-the-desk reference
โฑ๏ธ Pacing Guide
Unit 1 is designed to fit in 6โ8 class periods of approximately 45 minutes each. This is the recommended pacing โ adjust based on your students' prior experience, class length, and how much homework time you can assume.
Recommended pacing โ 7-day plan
| Day | Lesson | Focus | Homework |
|---|---|---|---|
| Day 1 | L1: Variables | Intro to variables, naming rules, reassignment. Lab 1A in class. | Finish Lab 1B |
| Day 2 | L2: Data Types | int / str / bool / float. The quotes trap. Lab 2A in class. | Finish Lab 2B |
| Day 3 | L3: Operators | Math operators, comparison, = vs ==, modulo. Lab 3A in class. | Finish Lab 3B |
| Day 4 | L4: If / Else (pt 1) | if and else, indentation, colons. Lab 4A in class. | Read L4 Section 3 (elif) |
| Day 5 | L4: If / Else (pt 2) | elif, debugging exercise. Lab 4B in class. Knowledge check. | Plan Mad Libs story (Lab 4C optional) |
| Day 6 | L5: Mad Libs Project | Live walkthrough of starter code. Students begin building. | Continue project at home |
| Day 7 | L5: Mad Libs Project | Finish, test, present. Project showcase / peer feedback. | โ |
Compressed 6-day pacing
If you need to compress: combine Day 4 and Day 5 (cover all of Lesson 4 in one class) and assign Lab 4B as homework. This works for stronger groups but rushes the most pitfall-heavy lesson โ not recommended unless your students have prior Python exposure.
Extended 8-day pacing
If you have a shorter class period (30 min) or want more practice time: split each lesson into a "learn" day and a "lab" day. This is the most generous pacing and works well for first-time CS classes.
Suggested grading weights for Unit 1
| Component | Weight | Notes |
|---|---|---|
| Lesson Knowledge Checks (ร4) | 20% | 3 questions each, completed in-platform |
| Lab Exercises (ร9) | 40% | Completed in CodeSkills Lab; checked for completion + correctness |
| Mad Libs Final Project | 30% | Capstone โ see rubric in Lesson 5 plan |
| Class participation | 10% | Discussion, peer help, exit tickets |
๐ Standards & Exam Crosswalk
This crosswalk shows exactly which Florida CTE standards and Coding Fundamentals exam objectives each lesson addresses. Use this for admin reviews, IEP documentation, or to prove alignment when adopting the curriculum.
Florida CTE Standards โ Course #9009200
Standards from the Florida Department of Education Coding Fundamentals curriculum framework that Unit 1 addresses:
| Standard | Description | Lessons |
|---|---|---|
| 01.01 | Use specialized computer coding software to solve problems. | All (CodeSkills Lab) |
| 01.02 | Demonstrate proficiency using specialized computer software (e.g., Python). | All |
| 02.02 | Explain the components of programming languages. | L1, L2, L3, L4 |
| 05.06 | Recognize that more than one algorithm can solve a given problem. | L4 (multiple branches), L5 |
| 05.07 | Create a program that implements an algorithm to achieve a given goal. | L5 (Mad Libs) |
| 07.01 | Describe the structure of a simple program; explain why sequencing is important. | L1, L2, L5 |
| 07.04 | Describe selection programming structures (if/then, else); explain logic for if statements. | L4 |
| 07.05 | Explain the types and use of variables in programming. | L1, L2, L3 |
| 07.07 | Troubleshoot and debug errors in code. | L2 (Lab 2B), L4 (Lab 4B) |
Coding Fundamentals Exam Objectives
Exam objectives that Unit 1 prepares students for. The Practice Tests in your Knowledge Pillars platform directly align to these objectives.
| Obj | Title | Coverage in Unit 1 | Lessons |
|---|---|---|---|
| 1 | Core programming concepts | Full coverage | L1, L2, L3, L4 |
| 2 | Analyze and predict code behavior | Partial โ conditionals + tracing only (loops are Unit 2) | L4 |
| 4 | Write and debug simple programs | Partial โ syntax, structure, commenting, fixing errors | L2, L4, L5 |
| 7 | Debugging techniques | Partial โ reading errors, fixing problems | L2 (Lab 2B), L4 (Lab 4B) |
Lesson-by-lesson alignment
| Lesson | Florida Standards | Exam Objectives |
|---|---|---|
| L1: Variables | 01.01, 01.02, 02.02, 07.01, 07.05 | 1 |
| L2: Data Types | 01.01, 01.02, 02.02, 07.05, 07.07 | 1, 4, 7 |
| L3: Operators | 01.01, 01.02, 02.02, 07.05 | 1 |
| L4: If / Else | 01.01, 01.02, 02.02, 05.06, 07.04, 07.07 | 1, 2, 4, 7 |
| L5: Mad Libs Project | 01.01, 01.02, 05.06, 05.07, 07.01, 07.04, 07.05 | 1, 2, 4 |
๐ Unit 1 Vocabulary Glossary
All key terms students will encounter in Unit 1. The lesson where each term is introduced is shown in the rightmost column. Each lesson plan also includes its own focused vocabulary list.
| Term | Definition | Example | Intro |
|---|---|---|---|
| Variable | A named container that stores a value so your program can use it later. | score = 100 | L1 |
| Assignment Operator (=) | The = sign. It does NOT mean "equals" โ it means "put this value into this variable." | name = "Alex" | L1 |
| Reassignment | Updating a variable to hold a new value. The old value is replaced and gone. | score = score + 5 | L1 |
| print() | A built-in Python function that displays a value on the screen. Parentheses required. | print(name) | L1 |
| Integer (int) | A whole number with no decimal point. Can be positive, negative, or zero. | lives = 3 | L2 |
| String (str) | Text data โ any characters wrapped in single or double quotes. | city = "Orlando" | L2 |
| Boolean (bool) | A value that is either True or False โ nothing else. Used for on/off situations. | is_ready = True | L2 |
| Float | A number that includes a decimal point. | price = 9.99 | L2 |
| Data Type | The kind of value a variable holds. Tells Python how to work with it. | type(42) โ int | L2 |
| type() | Built-in Python function that returns the type of a value. | type("hi") | L2 |
| Operator | A symbol that performs an action on data โ math, comparison, or combining strings. | 5 + 3 | L3 |
| Comparison Operator | Compares two values and returns True or False. Includes ==, !=, >, <, >=, <=. | score == 100 | L3 |
| Modulo (%) | Returns the remainder after dividing. Great for checking even/odd. | 10 % 3 โ 1 | L3 |
| Concatenation | Joining two or more strings together using the + operator. | "Hi" + " " + "Alex" | L3 |
| f-string | A string that starts with f and lets you drop variable values directly inside using { }. | f"Hi, {name}!" | L3 / L5 |
| Conditional | An if/else statement that runs different code depending on a condition. | if score >= 60: | L4 |
| elif | Short for "else if." Adds more branches to a decision block between if and else. | elif score >= 70: | L4 |
| Indentation | Spaces at the start of a line that tell Python what belongs inside a code block. Required. | print("inside!") | L4 |
| Syntax | The grammar rules of a programming language. A syntax error means Python can't parse the code. | SyntaxError | L4 |
| input() | A Python function that pauses the program and waits for the user to type something. | name = input("Name: ") | L5 |
๐ฆ Lesson 1 ยท Variables โ Your Code's Storage Boxes
Lesson 1 ยท Variables
Lesson PlanAt-a-Glance
print()Lesson Flow (45 minutes)
๐ฅ Warm-Up (5 min)
- Ask the class: "If you had a labeled box, what would you put inside? What would you label it?" Take 3โ4 examples.
- Connect it to programming: "In Python, a variable IS a labeled box. The label is the name; what's inside is the value. Today we learn how to make our own boxes."
๐ค Direct Instruction (10 min)
- Open Lesson 1 on the projector. Walk through Section 1 ("What is a Variable?") with the class.
- Live-code three variables on the projector:
player_name = "Alex",score = 0,lives = 3. Run them to show nothing visible happens โ emphasize the box analogy. - Add
print(player_name)and run again. Ask: "What's the difference between the variable name and the value?" - Show the rules slide. Highlight the most common rule break: variable names cannot start with a number.
๐ค Guided Practice (10 min)
- Walk through Section 3 ("Changing a Variable's Value") on the projector. Live-code
score = score + 5and trace it on the whiteboard: write "score = 10" in a box, then erase the 10 and write 15. - Ask: "What happened to the old 10?" Reinforce that reassignment ERASES the old value.
- Have students predict the output of:
x = 5; x = 20; x = 15; print(x). (Answer: 15)
๐ป Independent Lab (15 min)
- Students complete Lab 1A ("Make It Personal") in CodeSkills Lab. They replace placeholder values, add 2 new variables, and print them all.
- Circulate. Watch for: missing quotes around strings, typos in variable names that cause
NameError, students who forget theprint()statement. - If time allows: start Lab 1B ("Score Updater") together, leave the rest for homework.
๐ช Exit Ticket (5 min)
- Have students write down (on paper or in a chat): "What does
score = score + 5actually do, in your own words?" - Quick check: do they describe it as "replacement" (good) or "equals" (needs reteach)?
โ ๏ธ Watch For โ Common Misconceptions
= means equals."score = 10 as "score equals 10," which sets them up for huge confusion in Lesson 3 when == is introduced.= aloud as "gets" or "is set to." "score gets 10." "name gets Alex." Never say "equals." Reinforce this every time you read code aloud, all unit long.1st_player = "Alex" and get a SyntaxError. They don't understand why this is illegal but player1 is fine.score = 10 followed by score = 20 means the variable now holds 30. They're confusing assignment with addition.๐ฏ Differentiation
For early finishers
Have early finishers add THREE more variables of three different types (number, text, True/False) and print them all with descriptive labels likeprint("My favorite color:", color). This previews data types and primes them for Lesson 2.
For struggling students
Pair them with a stronger student for Lab 1A. Skip Lab 1B for class time โ assign as optional homework. Print out a one-page "variable rules cheat sheet" they can tape to their desk.๐ฌ Discussion Prompts
- Why do you think Python uses
=instead of an arrow โ for assignment? (Answer: keyboard accessibility โ = is on every keyboard, โ is not.) - What would happen if Python allowed variable names with spaces, like
high score? (Answer: it couldn't tell when one name ended and another began.) - Can you change a variable's value as many times as you want? Is there a limit? (Answer: no limit; this is what makes programs dynamic.)
๐ Real-World Connections
- Every app uses variables: your username, your high score, your battery percentage, the current temperature on your phone โ all stored in variables.
- Spreadsheets work the same way: each cell is a labeled variable.
=A1+B1in Excel is the same idea astotal = a + bin Python. - Video games store hundreds of variables for each player: health, mana, position x, position y, inventory items. Every frame, those variables get updated.
๐ Lesson-Specific Vocabulary
score = 100= symbol. It puts a value INTO a variable. It is NOT "equals."๐ข Lesson 2 ยท Data Types โ What Kind of Stuff?
Lesson 2 ยท Data Types
Lesson PlanAt-a-Glance
type()Lesson Flow (45 minutes)
๐ฅ Warm-Up (5 min)
- Show three things on the board: a name (
"Alex"), a number (12), and a yes/no answer (True). Ask: "What KIND of information is each one? Are they all the same?" - Connect: "Just like in real life โ names, numbers, and yes/no answers are different โ Python keeps them separate too. Today we learn the four main types."
๐ค Direct Instruction (10 min)
- Open Lesson 2 on the projector. Walk through the four data types using the cards in Section 1.
- Pay extra attention to the QUOTES TRAP (Section 2). Live-code:
age = 12vsage = "12". Runprint(age + 1)for each. Show the error message and decode it together. - Demo
type()on the projector with each kind:type(42),type("42"),type(True),type(3.14). Read each output aloud.
๐ค Guided Practice (10 min)
- Play the Data Type Sorting Game in Section 3 as a class. Project it; have students call out which bucket each value goes in. Discuss the trickier ones (
"007"โ that's a string, not a number, because of the quotes). - On the whiteboard, write 5 values:
100,"hello",True,9.99,"100". Have students label each with its type. The last one is the gotcha โ it's a string.
๐ป Independent Lab (15 min)
- Students complete Lab 2A ("Type Detective") in CodeSkills Lab โ create one variable of each type and verify with
type(). - Stronger students continue to Lab 2B ("Spot the Type Error") โ fix a TypeError caused by adding an int to a string.
- Circulate. Watch for: capital T/F in Boolean (must be
True/False, not TRUE / true), missing quotes on strings.
๐ช Exit Ticket (5 min)
- Ask students to write the type of each:
7ยท"7"ยท7.0ยทFalse - Answers: int, str, float, bool. The first two trip students up โ same character, different types.
โ ๏ธ Watch For โ Common Misconceptions
"42" and 42 are the same thing."age = "12" then try age + 1 and get a TypeError. They don't understand why 12 wouldn't be a number.is_ready = true (lowercase) and get a NameError, or worse, is_ready = "True" and don't understand why it doesn't behave as a Boolean.True or False with capital first letter and no quotes. Show all the wrong variations on the projector and let Python reject each one.5 and 5.0 print as different types, or why dividing two ints can give a float (10 / 2 = 5.0)./) ALWAYS gives a float in Python, even with whole-number results. This is important context for Lesson 3.๐ฏ Differentiation
For early finishers
Challenge them to predict and verify the type of more complex values:type(True + 1)? type("5" * 3)? type(3 + 0.5)? These reveal Python's automatic type rules and preview later units.
For struggling students
Skip Lab 2B for class time. Have them complete only Lab 2A and the Sorting Game. Print the four-types reference card from Lesson 2 Section 1 for them to keep.๐ฌ Discussion Prompts
- Why does Python need to know what type a variable is? Couldn't it just figure it out? (Answer: it does figure it out, but knowing the type prevents bugs โ e.g., adding text to a number is meaningless and Python catches it.)
- When would you store a phone number as a string instead of an integer? (Answer: phone numbers can have leading zeros, dashes, parentheses โ none of which work as numbers. Phone numbers are text data.)
- Is
True/Falsethe same as1/0? (Advanced โ Python actually treats True as 1 and False as 0 in math contexts, but they are technically different types.)
๐ Real-World Connections
- Every form you fill out online enforces data types: the email field expects a string, the age field expects a number, the "I agree to terms" checkbox is a Boolean.
- Banking apps separate dollars (often stored as strings or special money types) from balances (floats) to prevent calculation errors with cents.
- Sports apps: a player's name is a string, jersey number is an integer, batting average is a float, and "is on the field right now" is a Boolean.
๐ Lesson-Specific Vocabulary
True or False. Note the capital first letter and the lack of quotes.type(42) returns <class 'int'>.โ Lesson 3 ยท Operators โ Do the Math (and More!)
Lesson 3 ยท Operators
Lesson PlanAt-a-Glance
+, โ, ร, /, **, %), comparison operators (==, !=, >, <, >=, <=), and string concatenation; they will distinguish between = (assignment) and == (comparison).Lesson Flow (45 minutes)
๐ฅ Warm-Up (5 min)
- Show a calculator on the screen. Ask: "What buttons do you press most? What do they do?" Get a list of operations.
- Connect: "Python has all those operations โ and a few more your calculator doesn't have, like one that gives the LEFTOVER after dividing. Let's meet them."
๐ค Direct Instruction (10 min)
- Open Lesson 3. Walk through the math operators table. Live-code each one on the projector. Pay attention to: division always gives a float,
**is exponent (not 2 stars meaning multiplication),%is modulo. - Spend extra time on modulo. Use the "sharing pizza" analogy from the lesson: 10 slices among 3 friends โ 3 each, 1 left over โ
10 % 3 = 1. Ask the class to figure out11 % 2(answer: 1, because 11 is odd). - Walk through comparison operators. The CRITICAL slide is
=vs==. Drill this: "=puts a value IN a variable.==ASKS A QUESTION about two values." Read both aloud multiple times. - Demo string concatenation:
"Code" + "r"โ"Coder". Show the f-string version too:f"Hi, {name}!"โ same result, cleaner code.
๐ค Guided Practice (10 min)
- Use the Interactive Operator Explorer in Section 5. Have students suggest two numbers and an operator; predict the result; then click Calculate to verify.
- Run the "Predict the Output" challenges in Section 6 as a class. Especially focus on the modulo questions.
๐ป Independent Lab (15 min)
- Students complete Lab 3A ("Score Calculator") in CodeSkills Lab โ addition with reassignment, comparison, modulo for even/odd.
- Lab 3B ("Name Builder") โ practice concatenation and f-strings side by side.
- Circulate. Watch for: students writing
if score = 100(should be==), students forgetting the spaces in concatenation ("Hi" + "Alex"gives"HiAlex"not"Hi Alex").
๐ช Exit Ticket (5 min)
- Have students answer two on paper: (a) What is
17 % 5? (b) What's the difference between=and==? - Answers: (a) 2 (b)
=assigns;==compares. If most can't answer (b), reteach next class.
โ ๏ธ Watch For โ Common Misconceptions
= and == do the same thing."if score = 100: in Lesson 4 and get a SyntaxError. They might also write x == 5 expecting it to assign (it doesn't โ it just evaluates True or False and discards the result).10 % 3 = 3 (the quotient) instead of 1 (the remainder). They confuse % with /.12 / 4 = 3 (the quotient). 12 % 4 = 0 (no remainder, divides evenly). 13 % 4 = 1 (one left over). Drill until they internalize "% is the leftover."+ always means addition.""3" + "2" and predict 5. They get "32" and don't understand why.+ has TWO jobs: with numbers it adds, with strings it joins. Quotes determine which job runs. Show "3" + "2" โ "32" and 3 + 2 โ 5 side by side.๐ฏ Differentiation
For early finishers
Challenge them to write a mini calculator that takes two numbers and prints all six math operators applied to them (+, โ, ร, /, **, %). Or have them figure out what 2 ** 0.5 does (square root!).
For struggling students
Focus on Lab 3A only. Skip 3B for class time. Print a one-page operator reference card with every operator and one example each.๐ฌ Discussion Prompts
- Why do you think computers use
%to mean "remainder"? Where else might you have seen%? (Discuss: percentages โ but in Python, % is something completely different. Programming reuses symbols.) - Could programming have used different symbols entirely โ like words instead of symbols? (Yes โ some languages do! Python uses words sometimes too:
and,or,not.) - When would you check if a number is even or odd in a real program? (Answers: alternating row colors in a table, every-other-frame animation, splitting a class into two teams, etc.)
๐ Real-World Connections
- Every social media app uses comparison:
if user_age >= 13: allow_signupis literally checking what we just learned. - Modulo runs your phone's battery percentage indicator โ every time the battery drops by 1%, modulo math determines whether to show 47%, 46%, etc.
- Concatenation builds every personalized message you see online:
"Welcome back, " + user_name + "!"is the Python behind every login screen.
๐ Lesson-Specific Vocabulary
10 % 3 returns 1 because 10 รท 3 leaves a remainder of 1.==, !=, >, <, >=, <=.+. "Hi" + "!" makes "Hi!"f that lets you embed variables using {}. f"Hi {name}!" replaces {name} with the variable's value.๐ Lesson 4 ยท If / Else โ Make Decisions in Code
Lesson 4 ยท If / Else
Lesson PlanAt-a-Glance
if, elif, and else with correct colons and indentation; they will explain how Python evaluates conditions top-to-bottom.elif, Indentation, SyntaxLesson Flow (45 minutes)
๐ฅ Warm-Up (5 min)
- Ask: "Have you ever played a Choose Your Own Adventure book or game? What does the story do based on your choice?"
- Connect: "Programs make choices the same way. Today we learn the words Python uses to make decisions:
if,elif,else."
๐ค Direct Instruction (12 min)
- Open Lesson 4. Walk through Section 1 ("The if Statement"). Live-code on projector:
if score >= 60: print("You passed!"). Run withscore = 75(passes), thenscore = 45(skips). - Highlight TWO non-negotiable rules: every
ifline ends with a COLON (:); the body must be INDENTED 4 spaces. These are Python's #1 and #2 syntax errors. - Add an
elseblock. Run again with both score values. Show that exactly ONE branch always runs โ never both, never neither. - Walk through
elif(Section 3). Use the grade checker: A / B / C / try again. Trace what happens withscore = 85โ show that Python checks top-to-bottom and STOPS at the first True condition. - Show indentation rules (Section 4). Use the visual diagram from the lesson. Drive home: indentation is what tells Python what's INSIDE the if block. Get it wrong โ
IndentationError.
๐ค Guided Practice (8 min)
- Use the If/Else Simulator in Section 5. Have students suggest scores; predict which branch runs; then click Run to verify.
- On the whiteboard, write a buggy snippet:
if score > 50 print("win!"). Ask students to spot both bugs (missing colon, missing indentation).
๐ป Independent Lab (15 min)
- Students complete Lab 4A ("Temperature Advisor") in CodeSkills Lab โ fill in
elifandelsebranches with their own messages. - Lab 4B ("Spot the Indentation Bug") โ find and fix two real bugs (missing colon, missing indentation).
- Lab 4C ("Build Your Own Decision") is optional/homework โ students design their own if/elif/else from scratch.
- Circulate intensely. This lesson generates the most errors of any in Unit 1. Common ones: forgotten colons, off-by-one indentation, using
=instead of==in the condition.
๐ช Exit Ticket (5 min)
- Have students predict the output for:
score = 85; if score >= 90: print("A"); elif score >= 80: print("B"); elif score >= 70: print("C"); else: print("Try again") - Answer: B. The reasoning matters more than the answer โ students who say "because it's the first True one" have understood the lesson.
โ ๏ธ Watch For โ Common Misconceptions
if / elif / else lines."SyntaxError: expected ':'. The most common Python error in Unit 1.if, elif, else, def, for, while) ends with a colon. Make this a unison chant when reading code aloud.IndentationError: expected an indented block. Or worse: code runs but does the wrong thing because lines that should be inside the if are outside it.elif branches doesn't matter."if score >= 60: print("C"); elif score >= 90: print("A")โฆ and a 95 prints "C". They don't understand why.= instead of == in conditions."if score = 100: causes SyntaxError. Echo of Lesson 3.==.๐ฏ Differentiation
For early finishers
Have them complete Lab 4C โ design their own decision program with at least 4 branches on a topic of their choice. Or challenge them to nest anif INSIDE another if (preview of complex logic).
For struggling students
Spend more time with Lab 4A โ don't rush them to 4B. Sit with them as they fix their firstIndentationError so they see the pattern. Print a card with the indentation rules.
๐ฌ Discussion Prompts
- Why do you think Python uses indentation instead of curly braces
{ }like other languages? (Answer: forces readable code; once you get used to it, indentation IS the structure.) - What happens if you have an
ifwithout anelse? (Nothing โ Python just does nothing if the condition is False.elseis OPTIONAL but often useful.) - What happens if you have multiple
elifbranches that are ALL True? (Only the FIRST one runs. Python stops checking after the first match.)
๐ Real-World Connections
- Every login screen uses if/else: "if password matches, log in; else, show error."
- Game AI is full of if/elif/else: "if player is close, attack; elif player is far, walk closer; else, stand still."
- Spam filters: "if email contains 'free money', mark as spam; elif sender is in contacts, mark as safe; else, send to inbox."
- Self-driving cars: "if light is red, stop; elif light is yellow and we're close, stop; else, continue."
๐ Lesson-Specific Vocabulary
if, elif, else.if and the final else.SyntaxError before running the program.๐ฎ Lesson 5 ยท Mad Libs โ Final Project
Lesson 5 ยท Mad Libs Capstone
Project PlanAt-a-Glance
input() into a complete working Python program (Mad Libs game).input(), f-string (review), all prior Unit 1 vocabularyProject Flow (90 minutes across 2 days)
๐ Day 1 โ Walk-through and start (45 min)
- Warm-up (5 min): Have you ever played Mad Libs? Take responses. Project a sample Mad Libs story and read it aloud โ emphasize that the story is built from random words submitted before anyone sees it.
- Live walkthrough (15 min): Open Lesson 5 on projector. Walk through the four-step structure: collect โ store โ build with f-strings โ branch with if/else. Run the starter code as-is so students see the output before writing any code.
- Concept introduction (5 min):
input()is the new tool. Show thatinput()ALWAYS returns a string โ to use it as a number, wrap withint(input(...)). - Project setup (5 min): Have students copy the starter code into CodeSkills Lab and run it once unmodified.
- Independent build (15 min): Students customize the story โ different theme, different questions, their own if/elif/else for the ending.
๐ Day 2 โ Finish, test, share (45 min)
- Continue building (15 min): Students finish their custom story. Encourage at least one bonus challenge.
- Testing (10 min): Each student runs their own program three times with different inputs. Are all if/elif/else branches reachable? Any crashes when typing letters where numbers are expected?
- Peer testing (10 min): Pair up. Each student tests a partner's Mad Libs and gives feedback: what was funny? what could be more interesting?
- Showcase (10 min): A handful of volunteers run their Mad Libs in front of the class with class members supplying the words. Celebrate creativity over perfection.
โ ๏ธ Watch For โ Common Project Pitfalls
int() around input() for numbers.number = input("Enter a number: ") then if number > 5: gets a TypeError because they're comparing a string to an integer.input() ALWAYS returns a string. To use it as a number, wrap with int(): number = int(input(...)). Reinforce that this is the same Lesson 2 "quotes trap" โ the input is a string until you convert it.print(f"They said "hello" to me") and get a SyntaxError because the inner double quotes break the outer string.print(f"They said 'hello' to me"). Or vice versa. Python is fine either way as long as they don't collide.print statements OUTSIDE the if block by accident.๐ฏ Differentiation
For students who finish early
Direct them to the bonus challenges in Lesson 5: add more if/elif branches, use modulo for an even/odd surprise, accept multiple players' words and create a comparison story, add ASCII art at the end.For struggling students
It's OK if their Mad Libs is closer to the starter code. Focus on getting one custom story working end-to-end. Skip the if/elif customization if needed and accept the original branches.๐ฌ Discussion Prompts
- What was harder than you expected? What was easier? (This metacognitive question reveals where students are still shaky โ and helps them realize how far they've come.)
- If you wanted to make your Mad Libs work for two players, what would you change? (Preview: more variables, more f-strings โ same building blocks at bigger scale.)
- Could you build a multiple-choice quiz using the same building blocks? What would you need to add? (Connection: more if/elif branches, an input prompt asking for an answer, comparison with the correct answer.)
๐ Real-World Connections
- Every "choose your own adventure" game is just nested if/else with branching outcomes.
- AI chatbots in 2026 are vastly more sophisticated โ but their core is still
input()โ process โ output, the same shape your Mad Libs uses. - Form-based websites (registration, surveys, quizzes) follow the same pattern: collect input, process it, branch based on what was entered.
๐ Mad Libs Project Rubric (30 points)
| Criterion | Description | Pts |
|---|---|---|
| Variables | Uses at least 4 named variables. Names follow Python rules (snake_case, no leading numbers). | 4 |
| Data types | Includes at least one of each: string (text input), int (numeric input via int(input(...))), and a third type chosen by the student. | 4 |
| Operators | Uses at least one comparison operator AND at least one + or f-string for output. | 4 |
| if / elif / else | Includes a complete if + elif + else block where the chosen branch depends on user input. All three branches reachable with some input. | 8 |
| input() | Collects at least 3 pieces of input from the user with clear, descriptive prompts. | 4 |
| Customization | Story is the student's own (not just the starter). Theme is creative, prompts are interesting. | 4 |
| Comments | Includes at least 3 comments explaining what sections of code do. | 2 |
| TOTAL | 30 | |
๐ Bonus Challenges (extra credit)
- Add a 4th branch to the if/elif/else (now if + 2 elifs + else): +2 pts
- Use modulo (
%) for an even/odd surprise message: +2 pts - Accept input from a second "player" and combine the two stories: +3 pts
- Add ASCII art (using
print()with multiple lines) at the start or end: +1 pt
๐ Lesson-Specific Vocabulary
f that lets variables be dropped in using { }. Used heavily in Mad Libs to weave inputs into the story sentence.๐ ๏ธ Appendix ยท Common Python Errors in Unit 1
This appendix lists the most common Python error messages students will see in Unit 1 and how to help them fix each one. Save yourself time by recognizing these instantly.
What it usually means: Python can't parse the line at all. Most often a missing colon at the end of an if/elif/else line, or unbalanced quotes/parentheses.
How to fix: Look at the line number Python points to. Check for: (1) a missing : at the end, (2) a missing closing quote, (3) a missing closing ).
What it usually means: Forgot the colon at the end of an if, elif, else, def, for, or while line.
How to fix: Add the : at the end of that line. Reinforce: every line that introduces a block needs a colon.
What it usually means: Python expected indented code after an if/else (or similar), but the next line wasn't indented.
How to fix: Indent the line(s) that should be inside the if block by 4 spaces.
What it usually means: Python is asked to use a variable that doesn't exist. Common causes: typo in variable name, forgot quotes around a string (so Python thinks the string is a variable name), or used a variable before defining it.
How to fix: Check: did they spell the name the same as where they defined it? If they wrote print(Hello), did they mean print("Hello") with quotes?
What it usually means: Trying to add a number and a string. Classic Lab 2B bug. Or trying to compare input() with a number without converting.
How to fix: Convert one to match the other. To turn a string into a number: int("5"). To turn a number into a string: str(5).
What it usually means: Tried to convert a string that isn't a valid number to an integer. Often happens in Mad Libs when a student types letters at a number prompt.
How to fix: For Unit 1 it's enough to tell students "type a number, not letters." Proper input validation comes in Unit 4.
What it usually means: Mixed tabs and spaces, OR the indentation is inconsistent across the if block (some lines indented 4 spaces, others 2 or 6).
How to fix: Re-indent the entire block uniformly with 4 spaces. The CodeSkills Lab editor should handle this consistently โ but if students have copy-pasted from elsewhere, mixed whitespace can sneak in.
โ End of Unit 1 Teacher's Guide โ
