#!/usr/bin/env python3
"""
Week 14: Problem Solving Strategies — REWRITTEN
Phase 2: Addition & Subtraction to 100
Key skills: Draw it, work backward, look for patterns, guess and check
New Standard:
- Reduced drill (40% fewer problems)
- Estimation before calculating
- Multiple strategies encouraged
- Better word problems (reasoning over keywords)
- Real challenges (open-ended thinking)
- Number talks (compare without calculating)
- Friday self-check with reflection
- Mental math ±10, ±100 woven throughout
- Unknowns in equations
- Word problems every day
"""
import os
import glob
from weasyprint import HTML
from math_helpers import (
CSS, TEACHER_CSS,
page, page_multi, hdr, sec, b, bw, bl,
tg_page, tg_page_multi, tg_sec, tg_note, tg_section_title,
)
BASE = os.path.expanduser("~/Home_School/2nd_Grade/Math")
WEEK = os.path.join(BASE, "Week_14")
# ═══════════════════════════════════════════════════
# MONDAY — Strategy: Draw a Picture
# ═══════════════════════════════════════════════════
def monday():
# 1: Fluency warmup — ±100 (2.NBT.B.8)
s1 = '<div class="abox" style="background:#e8f5e9;">'\
'<p><b>2-min Fluency Warm-up</b> — Mental math.</p>'\
'<div class="mgrid c3">'
for expr in [("300 + 100", ""), ("500 − 100", ""), ("200 + 100", ""), ("800 − 100", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Strategy — draw a picture to solve
s2 = '<div class="abox" style="background:#e3f2fd;">'\
'<p><b>Problem Solving Strategy #1: Draw a Picture</b></p>'\
'<p>When a problem is hard to picture in your head, draw it!</p>'\
'<div class="mgrid c2" style="gap:12px;">'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Problem: There are 24 apples in the basket. '\
'12 are red and the rest are green. How many are green?</p>'\
'<p style="font-size:11px; color:#3f51b5;">Draw: 24 circles total, color 12 red, count the rest</p>'\
'<p style="font-weight:bold;">Answer: 24 − 12 = 12 green</p></div>'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Problem: There are 45 seats on the bus. '\
'28 seats are full. How many empty seats?</p>'\
'<p style="font-size:11px; color:#3f51b5;">Draw a bar: 45 total, 28 filled, find the gap</p>'\
'<p style="font-weight:bold;">Answer: 45 − 28 = 17 empty</p></div>'\
'</div></div>'
# 3: Practice — draw your own picture
s3 = '<p class="note">Read carefully — what\'s happening in the story? Then draw a picture to help you solve.</p>'\
'<div class="mgrid c2">'
problems = [
("The garden has 56 flowers. 23 are roses and the rest are tulips. How many tulips?", "tulips"),
("There are 72 students at the field trip. 38 are in 2nd grade. How many are NOT in 2nd grade?", "students"),
]
for text, unit in problems:
s3 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="min-height:60px; border:2px dashed #ccc; border-radius:3px;"></p>'\
'<p style="font-size:11px;">My answer: ' + b("6em") + f' {unit}</p></div>'
s3 += '</div>'
# 4: Word problem — two-step with drawing
s4 = '<div class="wp"><p class="note">This is a two-step problem. Draw to help!</p>'\
'<div class="abox"><p style="font-size:0.95em;">The class collected 84 cans for recycling. '\
'On Monday they got 32 cans. On Tuesday they got 28 cans. '\
'How many cans did they get on Wednesday?</p>'\
'<p style="min-height:60px; border:2px dashed #ccc; border-radius:3px;"></p>'\
'<p style="font-size:11px;">Step 1: ' + bw() + '</p>'\
'<p>Wednesday: ' + b("6em") + ' cans</p></div></div>'
# 5: Number Talk — draw vs. not draw
s5 = '<div class="abox" style="background:#fff3e0;">'\
'<p><b>Number Talk</b></p>'\
'<p>Which problem would be EASIER to draw for? Explain.</p>'\
'<div class="mgrid c2">'
s5 += '<div class="abox"><p>A: 345 + 267 = ?</p>'\
'<p style="font-size:11px;">My thinking: ' + bw() + '</p></div>'
s5 += '<div class="abox"><p>B: There are 48 red blocks and 35 blue blocks. How many more red than blue?</p>'\
'<p style="font-size:11px;">My thinking: ' + bw() + '</p></div>'
s5 += '</div></div>'
return page(14, "Monday", "Strategy: Draw a Picture",
f'''{sec(1, "Warm-up: ±100 Mental Math", s1)}
{sec(2, "Strategy: Draw a Picture", s2)}
{sec(3, "Practice — Draw It", s3)}
{sec(4, "Two-Step Word Problem", s4)}
{sec(5, "Number Talk", s5)}''')
# ═══════════════════════════════════════════════════
# TUESDAY — Strategy: Work Backward
# ═══════════════════════════════════════════════════
def tuesday():
# 1: Fluency warmup — ±100 (2.NBT.B.8)
s1 = '<div class="abox" style="background:#e8f5e9;">'\
'<p><b>2-min Fluency Warm-up</b> — Mental math.</p>'\
'<div class="mgrid c3">'
for expr in [("400 − 100", ""), ("250 + 100", ""), ("600 − 100", ""), ("150 + 100", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Strategy — work backward from the answer
s2 = '<div class="abox" style="background:#e3f2fd;">'\
'<p><b>Problem Solving Strategy #2: Work Backward</b></p>'\
'<p>When you know the answer but not the starting point, work backward!</p>'\
'<div class="mgrid c2" style="gap:12px;">'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Problem: I had some marbles. I found 18 more. '\
'Now I have 52. How many did I start with?</p>'\
'<p style="color:#3f51b5; font-size:11px;">Work backward: 52 − 18 = 34</p>'\
'<p style="font-weight:bold;">Answer: I started with 34 marbles</p></div>'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Problem: Sarah read some pages. Then she read 25 more. '\
'Now she has read 67 pages total. How many did she start with?</p>'\
'<p style="color:#3f51b5; font-size:11px;">Work backward: 67 − 25 = 42</p>'\
'<p style="font-weight:bold;">Answer: She started with 42 pages</p></div>'\
'</div></div>'
# 3: Practice — work backward
s3 = '<p class="note">Start with the answer and work backward.</p>'\
'<div class="mgrid c2">'
problems = [
("I had some stickers. My friend gave me 14 more. Now I have 48 stickers. How many did I start with?", "stickers"),
("There were some birds on the tree. 12 more flew in. Now there are 35 birds. How many were there at first?", "birds"),
("Jake had some dollars. He earned $23 mowing lawns. Now he has $56. How much did he start with?", "dollars"),
]
for text, unit in problems:
s3 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Work backward: ' + b("5em") + ' − ' + b("5em") + ' = ' + b("5em") + '</p>'\
'<p>Started with: ' + b("6em") + f' {unit}</p></div>'
s3 += '</div>'
# 4: Two-step backward
s4 = '<div class="abox" style="background:#f3e5f5;">'\
'<p><b>Challenge: Two-Step Backward!</b></p>'\
'<p style="font-size:0.95em;">The baker made some cupcakes. In the morning she sold 28. '\
'In the afternoon she sold 19. Now she has 33 left. How many did she start with?</p>'\
'<p style="font-size:11px;">Work backward from 33:</p>'\
'<p>Step 1: 33 + 19 = ' + b("5em") + '</p>'\
'<p>Step 2: ' + b("5em") + ' + 28 = ' + b("5em") + '</p>'\
'<p>Started with: ' + b("6em") + ' cupcakes</p></div>'
# 5: Unknown in equation
s5 = '<div class="abox"><p class="note">Find the missing number by working backward.</p>'\
'<div class="mgrid c2">'
s5 += f'<div class="abox"><p>{b("5em")} + 35 = 78</p>'\
'<p style="font-size:11px;">Work backward: ' + b("5em") + ' − ' + b("5em") + ' = ' + b("5em") + '</p></div>'
s5 += f'<div class="abox"><p>95 − {b("5em")} = 42</p>'\
'<p style="font-size:11px;">Work backward: ' + b("5em") + ' − ' + b("5em") + ' = ' + b("5em") + '</p></div>'
s5 += '</div></div>'
return page(14, "Tuesday", "Strategy: Work Backward",
f'''{sec(1, "Warm-up: ±100 Mental Math", s1)}
{sec(2, "Strategy: Work Backward", s2)}
{sec(3, "Practice", s3)}
{sec(4, "Challenge: Two-Step Backward", s4)}
{sec(5, "Find the Missing Number", s5)}''')
# ═══════════════════════════════════════════════════
# WEDNESDAY — Strategy: Look for a Pattern
# ═══════════════════════════════════════════════════
def wednesday():
# 1: Fluency warmup — find the pattern
s1 = '<div class="abox" style="background:#e8f5e9;">'\
'<p><b>2-min Fluency Warm-up</b> — What comes next?</p>'\
'<div class="mgrid c3">'
patterns = [
"10, 20, 30, 40, " + b("3em"),
"100, 200, 300, 400, " + b("3em"),
"5, 15, 25, 35, " + b("3em"),
"100, 80, 60, 40, " + b("3em"),
]
for pat in patterns:
s1 += f'<div class="abox"><p style="font-size:1.1em; text-align:center;">{pat}</p></div>'
s1 += '</div></div>'
# 2: Strategy — look for patterns
s2 = '<div class="abox" style="background:#e3f2fd;">'\
'<p><b>Problem Solving Strategy #3: Look for a Pattern</b></p>'\
'<p>When numbers repeat in a way, find the rule — then use it to solve!</p>'\
'<div class="mgrid c2" style="gap:12px;">'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Pattern: 12, 24, 36, 48, ...</p>'\
'<p style="color:#3f51b5; font-size:11px;">Rule: Add 12 each time</p>'\
'<p style="font-weight:bold;">Next 3: 60, 72, 84</p></div>'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Problem: A plant grows 2 cm each week. '\
'It was 10 cm at the start. How tall after 5 weeks?</p>'\
'<p style="color:#3f51b5; font-size:11px;">Pattern: 10, 12, 14, 16, 18, 20</p>'\
'<p style="font-weight:bold;">Answer: 20 cm tall</p></div>'\
'</div></div>'
# 3: Practice — find the pattern and solve
s3 = '<p class="note">Find the rule, then answer the question.</p>'\
'<div class="mgrid c2">'
problems = [
("15, 30, 45, 60, ___, ___. Rule: ____. What is the 7th number?", ""),
("200, 180, 160, 140, ___, ___. Rule: ____. What comes next?", ""),
]
for text, unit in problems:
s3 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Your answer: ' + b("6em") + '</p></div>'
s3 += '</div>'
# 4: Pattern word problem
s4 = '<div class="wp"><p class="note">Find the pattern, then solve.</p>'\
'<div class="abox"><p style="font-size:0.95em;">Every day this week, Maya saved $3. '\
'Day 1 she had $3, Day 2 she had $6, Day 3 she had $9.</p>'\
'<p>How much will she have on Day 7? Show the pattern.</p>'\
'<p style="font-size:11px;">Pattern: ' + bl() + '</p>'\
'<p>Day 7: $' + b("5em") + '</p></div></div>'
# 5: Challenge — create a pattern
s5 = '<div class="abox" style="background:#f3e5f5;">'\
'<p><b>Challenge: Create Your Own Pattern</b></p>'\
'<p>Make a number pattern with a secret rule. Write the first 5 numbers and the rule.</p>'\
'<p>My pattern: ' + bl() + '</p>'\
'<p>My rule: ' + bl() + '</p></div>'
return page(14, "Wednesday", "Strategy: Look for a Pattern",
f'''{sec(1, "Warm-up: What Comes Next?", s1)}
{sec(2, "Strategy: Look for a Pattern", s2)}
{sec(3, "Find the Rule", s3)}
{sec(4, "Pattern Word Problem", s4)}
{sec(5, "Challenge: Create Your Own", s5)}''')
# ═══════════════════════════════════════════════════
# THURSDAY — Strategy: Guess and Check
# ═══════════════════════════════════════════════════
def thursday():
# 1: Fluency warmup — ±10 and ±100 (2.NBT.B.8)
s1 = '<div class="abox" style="background:#e8f5e9;">'\
'<p><b>2-min Fluency Warm-up</b> — Mental math.</p>'\
'<div class="mgrid c3">'
for expr in [("700 − 100", ""), ("320 + 100", ""), ("55 − 10", ""), ("84 + 10", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Strategy — guess and check
s2 = '<div class="abox" style="background:#e3f2fd;">'\
'<p><b>Problem Solving Strategy #4: Guess and Check</b></p>'\
'<p>Make a smart guess, check if it works, then adjust!</p>'\
'<div class="mgrid c2" style="gap:12px;">'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Problem: Two numbers add up to 45. One number is 28. What is the other?</p>'\
'<p style="color:#3f51b5; font-size:11px;">Guess: 17 → 28 + 17 = 45 ✓</p>'\
'<p style="font-weight:bold;">Answer: 17</p></div>'\
'<div class="abox" style="padding:12px;">'\
'<p style="font-weight:bold;">Problem: I think of a number. Add 30 and you get 85. What is it?</p>'\
'<p style="color:#3f51b5; font-size:11px;">Guess: 55 → 55 + 30 = 85 ✓</p>'\
'<p style="font-weight:bold;">Answer: 55</p></div>'\
'</div></div>'
# 3: Practice — guess and check
s3 = '<p class="note">Make a guess, check it, adjust if needed.</p>'\
'<div class="mgrid c2">'
problems = [
("Two numbers add up to 63. One is 38. What is the other?", ""),
("A number plus 45 equals 91. What is the number?", ""),
("Two numbers add up to 72. One is 29. What is the other?", ""),
]
for text, unit in problems:
s3 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">My guess: ' + b("4em") + ' → Check: ' + bw() + '</p>'\
'<p>Answer: ' + b("5em") + '</p></div>'
s3 += '</div>'
# 4: Word problems — choose your strategy
s4 = '<div class="wp"><p class="note">Read carefully. Choose which strategy to use for each problem.</p>'\
'<div class="mgrid c2">'
problems = [
("The class has 68 books. 35 are fiction and the rest are non-fiction. How many non-fiction?", "non-fiction"),
("I thought of a number. Add 27 and you get 64. What is my number?", "number"),
]
for text, unit in problems:
s4 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Strategy I used: <span class="bw">____</span></p>'\
'<p style="font-size:11px;">My work: ' + bw() + '</p>'\
'<p>' + b("6em") + f' {unit}</p></div>'
s4 += '</div>'
# 4a: Two Ways — same problem, two different strategies
s4 += '<div class="abox" style="background:#fff8e1; margin-top:6px;">'\
'<p><b>Two Ways!</b> Solve this problem <b>two different ways</b> — use two different strategies.</p>'\
'<p style="font-size:0.95em;">There are 53 kids on the playground. 26 go inside. How many are still outside?</p>'\
'<div class="mgrid c2">'\
'<div class="abox"><p style="font-size:11px;">Way 1 — strategy: <span class="bw">____</span></p><p>' + bw() + '</p><p>Answer: ' + b("4em") + '</p></div>'\
'<div class="abox"><p style="font-size:11px;">Way 2 (another way) — strategy: <span class="bw">____</span></p><p>' + bw() + '</p><p>Answer: ' + b("4em") + '</p></div>'\
'</div></div></div>'
# 5: Challenge — hard problem
s5 = '<div class="abox" style="background:#f3e5f5;">'\
'<p><b>Challenge Problem</b></p>'\
'<p style="font-size:0.95em;">Two numbers add up to 100. One number is 36 more than the other. '\
'What are the two numbers?</p>'\
'<p style="font-size:11px;">Strategy I chose: <span class="bw">____</span></p>'\
'<p style="font-size:11px;">Show your work: ' + bl() + '</p>'\
'<p>My numbers: ' + b("5em") + ' and ' + b("5em") + '</p></div>'
return page(14, "Thursday", "Strategy: Guess and Check",
f'''{sec(1, "Warm-up: ±10 and ±100", s1)}
{sec(2, "Strategy: Guess and Check", s2)}
{sec(3, "Guess and Check Practice", s3)}
{sec(4, "Choose Your Strategy", s4)}
{sec(5, "Challenge Problem", s5)}''')
# ═══════════════════════════════════════════════════
# FRIDAY — Review All Strategies & Self-Check
# ═══════════════════════════════════════════════════
def friday():
# 1: Fluency warmup — ±100 (2.NBT.B.8)
s1 = '<div class="abox" style="background:#e8f5e9;">'\
'<p><b>2-min Fluency Warm-up</b> — Mental math.</p>'\
'<div class="mgrid c3">'
for expr in [("400 + 100", ""), ("700 − 100", ""), ("200 + 100", ""), ("900 − 100", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Strategy review — pick your strategy
s2 = '<p class="note">For each problem, write which strategy you will use: Draw, Work Backward, Pattern, or Guess and Check.</p>'\
'<div class="mgrid c2">'
problems = [
("There are 85 chairs in the gym. 42 are set up. How many more need to be set up?", "chairs"),
("I had some pencils. I lost 15. Now I have 34. How many did I start with?", "pencils"),
("A snail climbs 3 inches each day. How far in 6 days?", "inches"),
]
for text, unit in problems:
s2 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Strategy: <span class="bw">____</span></p>'\
'<p style="font-size:11px;">My work: ' + bw() + '</p>'\
'<p>' + b("6em") + f' {unit}</p></div>'
s2 += '</div>'
# 3: Mixed review — problem solving
s3 = '<div class="abox"><p class="note">Solve using any strategy you like.</p>'\
'<p>Two numbers add up to 150. One is 67. What is the other?</p>'\
'<p style="font-size:11px;">Show your work: ' + bl() + '</p>'\
'<p>Answer: ' + b("5em") + '</p></div>'
# 4: Open-ended challenge
s4 = '<div class="abox" style="background:#f3e5f5;">'\
'<p><b>Big Challenge</b></p>'\
'<p style="font-size:0.95em;">The school ordered 348 notebooks for the year. '\
'In September they used 87. In October they used 124. '\
'In November they used 63. How many notebooks are left?</p>'\
'<p style="font-size:11px;"><b>Estimate First</b> (round to friendly numbers): about ' + b("5em") + ' left</p>'\
'<p style="font-size:11px;">Strategy: <span class="bw">____</span></p>'\
'<p style="font-size:11px;">Show your work: ' + bl() + '</p>'\
'<p>Left: ' + b("6em") + ' notebooks</p></div>'
# 5: Self-check with reflection
s5 = '<div class="selfcheck">' \
'<p><b>Self-Check: How do you feel about problem solving strategies?</b></p>' \
'<div style="display:flex; gap:20px; flex-wrap:wrap;">' \
'<div style="background:#fff3e0; padding:10px; border-radius:5px; flex:1; min-width:150px;">' \
'<p><b>Draw a Picture</b></p>' \
'<p>😊 I got it! | 😐 Getting there | 😟 Need help</p>' \
'</div>' \
'<div style="background:#e3f2fd; padding:10px; border-radius:5px; flex:1; min-width:150px;">' \
'<p><b>Work Backward</b></p>' \
'<p>😊 I got it! | 😐 Getting there | 😟 Need help</p>' \
'</div>' \
'<div style="background:#e8f5e9; padding:10px; border-radius:5px; flex:1; min-width:150px;">' \
'<p><b>Look for a Pattern</b></p>' \
'<p>😊 I got it! | 😐 Getting there | 😟 Need help</p>' \
'</div>' \
'<div style="background:#f3e5f5; padding:10px; border-radius:5px; flex:1; min-width:150px;">' \
'<p><b>Guess and Check</b></p>' \
'<p>😊 I got it! | 😐 Getting there | 😟 Need help</p>' \
'</div>' \
'</div>' \
'<p style="margin-top:10px;"><b>My favorite strategy:</b> ' + bl() + '</p>' \
'<p><b>One thing I learned this week:</b> ' + bl() + '</p>' \
'<p><b>One thing I want to practice more:</b> ' + bl() + '</p>' \
'</div>'
return page(14, "Friday", "Week 14 Review & Self-Check",
f'''{sec(1, "Warm-up: ±100 Mental Math", s1)}
{sec(2, "Pick Your Strategy", s2)}
{sec(3, "Mixed Review", s3)}
{sec(4, "Big Challenge", s4)}
{sec(5, "Self-Check & Reflection", s5)}''')
# ═══════════════════════════════════════════════════
# TEACHER GUIDE
# ═══════════════════════════════════════════════════
def teacher_guide():
return tg_page_multi(
"Week 14", "Problem Solving Strategies — Teacher Guide",
tg_section_title("Monday: Draw a Picture") +
tg_sec(1, "Warm-up ±100", ["400, 400, 300, 700"]) +
tg_sec(2, "Strategy", ["24-12=12 green, 45-28=17 empty"]) +
tg_sec(3, "Practice", ["56-23=33 tulips, 72-38=34 not 2nd grade"]) +
tg_sec(4, "Two-Step", ["32+28=60, 84-60=24 cans Wednesday"]) +
tg_sec(5, "Number Talk", ["B easier to draw (concrete objects)"]) +
tg_note("Page break"),
tg_section_title("Tuesday: Work Backward") +
tg_sec(1, "Warm-up", ["300, 350, 500, 250"]) +
tg_sec(2, "Strategy", ["52-18=34 marbles, 67-25=42 pages"]) +
tg_sec(3, "Practice", ["48-14=34 stickers, 35-12=23 birds, 56-23=33 dollars"]) +
tg_sec(4, "Challenge", ["33+19=52, 52+28=80 cupcakes"]) +
tg_sec(5, "Unknown", ["78-35=43 | 95-42=53"]) +
tg_note("Page break"),
tg_section_title("Wednesday: Look for a Pattern") +
tg_sec(1, "Warm-up", ["50, 500, 45, 20"]) +
tg_sec(2, "Strategy", ["+12 rule: 60,72,84 | Plant: 10,12,14,16,18,20"]) +
tg_sec(3, "Find Rule", ["+15: 75,90 | -20: 120,100"]) +
tg_sec(4, "Pattern", ["3,6,9,12,15,18,21 → $21 on Day 7"]) +
tg_sec(5, "Create Own", ["Accept student-created patterns"]) +
tg_note("Page break"),
tg_section_title("Thursday: Guess and Check") +
tg_sec(1, "Warm-up", ["600, 420, 45, 94"]) +
tg_sec(2, "Strategy", ["45-28=17 | 85-30=55"]) +
tg_sec(3, "Practice", ["63-38=25 | 91-45=46 | 72-29=43"]) +
tg_sec(4, "Choose Strategy", ["Draw/Work Backward: 68-35=33 | Work Backward: 64-27=37", "Two Ways: 53-26=27 outside (any two valid strategies, same answer)"]) +
tg_sec(5, "Challenge", ["32 and 68 (32+68=100, 68−32=36 ✓)"]) +
tg_note("Page break"),
tg_section_title("Friday: Review All Strategies") +
tg_sec(1, "Warm-up", ["500, 600, 300, 800"]) +
tg_sec(2, "Pick Strategy", ["85-42=43 chairs | 34+15=49 pencils | 3×6=18 inches"]) +
tg_sec(3, "Mixed Review", ["150-67=83"]) +
tg_sec(4, "Big Challenge", ["Estimate: ≈350−(90+120+60)=80; Actual: 87+124+63=274 used, 348-274=74 left"]) +
tg_sec(5, "Self-Check", ["Accept student self-assessment and reflection"])
)
# ═══════════════════════════════════════════════════
# GENERATE
# ═══════════════════════════════════════════════════
if __name__ == "__main__":
os.makedirs(WEEK, exist_ok=True)
for f in glob.glob(os.path.join(WEEK, "*.pdf")):
os.remove(f)
days = [
(monday, "Monday", "Strategy: Draw a Picture"),
(tuesday, "Tuesday", "Strategy: Work Backward"),
(wednesday, "Wednesday", "Strategy: Look for a Pattern"),
(thursday, "Thursday", "Strategy: Guess and Check"),
(friday, "Friday", "Week 14 Review & Self-Check"),
]
for lesson_func, day, title in days:
html = lesson_func()
fname = f"Week_14_{day}"
path = os.path.join(WEEK, f"{fname}.html")
with open(path, "w") as f:
f.write(html)
pdf_path = os.path.join(WEEK, f"{fname}.pdf")
HTML(filename=path).write_pdf(pdf_path)
print(f"Generated: {pdf_path}")
html = teacher_guide()
path = os.path.join(WEEK, "Week_14_Teacher_Guide.html")
with open(path, "w") as f:
f.write(html)
pdf_path = os.path.join(WEEK, "Week_14_Teacher_Guide.pdf")
HTML(filename=path).write_pdf(pdf_path)
print(f"Generated: {pdf_path}")