#!/usr/bin/env python3
"""
Week 11: Mixed 2-Digit Addition & Subtraction — REWRITTEN
Phase 2: Addition & Subtraction to 100
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 (2.NBT.B.8)
- Unknowns in equations
- Word problems every day
- Fact fluency warmup daily
"""
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,
col_add, col_sub,
)
from activity_builders import (
build_column_addition,
build_column_subtraction,
build_two_step_problems,
)
BASE = os.path.expanduser("~/Home_School/2nd_Grade/Math")
WEEK = os.path.join(BASE, "Week_11")
# ═══════════════════════════════════════════════════
# MONDAY — Decide: Add or Subtract?
# ═══════════════════════════════════════════════════
def monday():
# 1: Fluency warmup — Mental math ±10 (2.NBT.B.8)
s1 = '<div class="abox" style="background:#e8f5e9;">'\
'<p><b>2-min Fluency Warm-up</b> — Mental math: add or subtract 10.</p>'\
'<div class="mgrid c3">'
for expr in [("42 + 10", ""), ("75 − 10", ""), ("36 + 10", ""), ("88 − 10", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Number Talk — Decide operation WITHOUT solving
s2 = '<div class="abox" style="background:#e3f2fd;">'\
'<p><b>Number Talk</b> — Read each situation. Do you ADD or SUBTRACT? Explain WHY.</p>'\
'<div class="mgrid c1">'
situations = [
("You had 24 marbles. Your friend gave you 18 more.", "ADD"),
("There were 67 birds on the wire. 32 flew away.", "SUBTRACT"),
("The bookshelf held 35 books. You added 28 more.", "ADD"),
("The cookie jar had 83 cookies. Someone ate 41.", "SUBTRACT"),
]
for text, op in situations:
s2 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
f'<p>Add or subtract? <span class="bw">______</span></p>'\
'<p style="font-size:11px;">Why? ' + bw() + '</p></div>'
s2 += '</div></div>'
# 3: Solve mixed problems — choose your operation
s3 = '<p class="note">Read each problem carefully. Decide if you add or subtract, then solve.</p>'\
'<div class="mgrid c3">'
problems = [
("28 + 35 = ", 63),
("72 − 28 = ", 44),
("46 + 37 = ", 83),
("85 − 39 = ", 46),
]
for prob, _ in problems:
s3 += f'<div class="abox"><p style="font-size:1.1em;">{prob}{b("5em")}</p></div>'
s3 += '</div>'
# 4: Unknowns in equations — both add and subtract
s4 = '<div class="abox">' \
'<p class="note">Find the missing number.</p>' \
'<div class="mgrid c3">'
for left, op, right, res in [
(8, "+", None, 15),
(None, "−", 7, 20),
(None, "+", 36, 84),
(91, "−", None, 57),
]:
if left is None:
s4 += f'<div class="abox"><p>{b("4em")} {op} {right} = {res}</p></div>'
else:
s4 += f'<div class="abox"><p>{left} {op} {b("4em")} = {res}</p></div>'
s4 += '</div></div>'
# 5: Challenge — Create a mixed problem set
s5 = '<div class="abox" style="background:#f3e5f5;">'\
'<p><b>Challenge</b> — Write 2 addition problems and 2 subtraction problems.</p>'\
'<p style="font-size:11px; color:#666;">Make them interesting! Use numbers you find cool.</p>'\
'<p>Addition 1: ' + bw() + '</p>'\
'<p>Addition 2: ' + bw() + '</p>'\
'<p>Subtraction 1: ' + bw() + '</p>'\
'<p>Subtraction 2: ' + bw() + '</p>'\
'</div>'
return page(11, "Monday", "Decide: Add or Subtract?",
f'''{sec(1, "Warm-up: ±10 Mental Math", s1)}
{sec(2, "Number Talk: Choose Your Operation", s2)}
{sec(3, "Mixed Practice", s3)}
{sec(4, "Find the Missing Number", s4)}
{sec(5, "Challenge: Create Your Own", s5)}''')
# ═══════════════════════════════════════════════════
# TUESDAY — Multiple Strategies for Mixed Operations
# ═══════════════════════════════════════════════════
def tuesday():
# 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 [("53 + 10", ""), ("78 − 10", ""), ("200 + 100", ""), ("400 − 100", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Estimate first, then solve (NEW)
s2 = '<div class="abox" style="background:#fff3e0;">'\
'<p><b>Estimate First!</b> Round to tens, estimate, then find the actual answer.</p>'\
'<div class="mgrid c2">'
for a, op, c in [(38, "+", 27), (65, "−", 28), (44, "+", 39), (82, "−", 36)]:
at = (a + 5) // 10 * 10
ct = (c + 5) // 10 * 10
if op == "+":
est = at + ct
else:
est = at - ct
s2 += f'<div class="abox"><p><b>{a} {op} {c}</b></p>'\
f'<p>Estimate ({at} {op} {ct}): {b("4em")}</p>'\
f'<p>Actual: {b("4em")}</p></div>'
s2 += '</div></div>'
# 3: Show two different strategies
s3 = '<div class="abox">' \
'<p class="note">Use a different strategy for each problem.</p>' \
'<p style="font-size:11px; color:#666;">Strategies: column method, base-10 blocks, number line, counting up.</p>' \
'<div class="mgrid c2">'
for a, op, c in [(28, "+", 45), (73, "−", 38), (56, "+", 37), (91, "−", 45)]:
s3 += f'<div class="abox"><p><b>{a} {op} {c} = </b>{b("5em")}</p>'\
'<p style="font-size:11px; color:#666;">Strategy I used: ' + bw() + '</p>'\
'<p style="min-height:40px; border-bottom:1px solid #ddd;"></p></div>'
s3 += '</div></div>'
# 4: Word problems — mixed add/subtract
s4 = '<div class="wp">'\
'<p class="note">Read carefully. Think about what is happening.</p>'\
'<div class="mgrid c2">'
problems = [
("The art room had 36 paint brushes. The teacher ordered 27 more. Then 8 brushes broke and were thrown away. How many good brushes are there now?", 55, "brushes"),
("A train had 84 passengers at the first stop. At the second stop, 31 passengers got off. At the third stop, 19 passengers got on. How many passengers are on the train now?", 72, "passengers"),
]
for text, _, unit in problems:
s4 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Draw or write your thinking: ' + bw() + '</p>'\
'<p>' + b("6em") + f' {unit}</p></div>'
s4 += '</div></div>'
# 5: Number Talk — compare WITHOUT calculating
s5 = '<div class="abox" style="background:#e3f2fd;">'\
'<p><b>Number Talk</b> — Explain WITHOUT calculating.</p>'\
'<div class="mgrid c2">'
s5 += '<div class="abox"><p>A: 45 + 38</p><p>B: 48 + 35</p><p>Which is bigger, or are they the same?</p><p style="font-size:11px;">My thinking: ' + bw() + '</p></div>'
s5 += '<div class="abox"><p>A: 72 − 24</p><p>B: 72 − 34</p><p>Which is bigger, or are they the same?</p><p style="font-size:11px;">My thinking: ' + bw() + '</p></div>'
s5 += '</div></div>'
return page(11, "Tuesday", "Multiple Strategies for Mixed Operations",
f'''{sec(1, "Warm-up: ±10 and ±100", s1)}
{sec(2, "Estimate First!", s2)}
{sec(3, "Show Two Different Strategies", s3)}
{sec(4, "Word Problems", s4)}
{sec(5, "Number Talk: Compare Without Calculating", s5)}''')
# ═══════════════════════════════════════════════════
# WEDNESDAY — Problem Solving with Mixed Operations
# ═══════════════════════════════════════════════════
def wednesday():
# 1: Fluency warmup — ±10 (2.NBT.B.8)
s1 = '<div class="abox" style="background:#e8f5e9;">'\
'<p><b>2-min Fluency Warm-up</b> — Mental math. Go fast!</p>'\
'<div class="mgrid c3">'
for expr in [("67 − 10", ""), ("34 + 10", ""), ("55 − 10", ""), ("23 + 10", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Mixed column practice — choose operation (reduced from 8 to 4)
s2 = '<p class="note">Solve each problem using columns.</p>'
s2 += '<div class="mgrid c3" style="gap:10px;">'
add_probs = [(28, 35), (46, 37)]
sub_probs = [(72, 28), (85, 39)]
for a, c in add_probs:
s2 += f'<div class="abox" style="text-align:center;">{col_add(a, c, 2)}</div>'
for a, c in sub_probs:
s2 += f'<div class="abox" style="text-align:center;">{col_sub(a, c, 2)}</div>'
s2 += '</div>'
# 3: Word problems — reasoning about situations (reduced from 4 to 3)
s3 = '<div class="wp">'\
'<p class="note">Think about the situation. Draw a picture or write your thinking.</p>'\
'<div class="mgrid c2">'
problems = [
("A baker made 63 cookies in the morning. In the afternoon, she baked 29 more cookies. How many cookies did she make that day?", 92, "cookies"),
("The school library had 95 books. By Friday, 47 books had been checked out. How many books are still on the shelf?", 48, "books"),
("Sarah has 38 red marbles and 27 blue marbles. She wants to know her total. How many marbles does Sarah have?", 65, "marbles"),
]
for text, _, unit in problems:
s3 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Draw or write your thinking: ' + bw() + '</p>'\
'<p>' + b("6em") + f' {unit}</p></div>'
s3 += '</div></div>'
# 4: Find the error — mixed operations (reduced from 3 to 2)
s4 = '<div class="abox">' \
'<p class="note">One of these has an error. Find it, explain the error, and fix it.</p>' \
'<div class="mgrid c2">'
s4 += '<div class="abox"><p style="text-align:center;"> 28</p><p style="text-align:center;">+ 45</p><hr><p style="text-align:center;"> 63</p><p>✓ or ✗?</p><p style="font-size:11px;">Explain: ' + bw() + '</p><p style="font-size:11px;">Correct: ' + b("4em") + '</p></div>'
s4 += '<div class="abox"><p style="text-align:center;"> 64</p><p style="text-align:center;">- 37</p><hr><p style="text-align:center;"> 33</p><p>✓ or ✗?</p><p style="font-size:11px;">Explain: ' + bw() + '</p><p style="font-size:11px;">Correct: ' + b("4em") + '</p></div>'
s4 += '</div></div>'
# 5: Even/odd check + challenge
s5 = '<div class="abox" style="background:#f3e5f5;">'\
'<p><b>Challenge: Even or Odd?</b> Solve each problem. Is the answer <b>even</b> or <b>odd</b>?</p>'\
'<div class="mgrid c3">'
for a, op, c in [(35, "+", 28), (74, "−", 39), (46, "+", 37)]:
s5 += f'<div class="abox"><p>{a} {op} {c} = {b("4em")}</p><p>even or odd? <span class="bw">____</span></p></div>'
s5 += '</div></div>'
return page(11, "Wednesday", "Problem Solving with Mixed Operations",
f'''{sec(1, "Warm-up: ±10 Mental Math", s1)}
{sec(2, "Mixed Column Practice", s2)}
{sec(3, "Word Problems", s3)}
{sec(4, "Find the Error", s4)}
{sec(5, "Challenge: Even or Odd?", s5)}''')
# ═══════════════════════════════════════════════════
# THURSDAY — Application & Open-Ended Challenges
# ═══════════════════════════════════════════════════
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 [("81 − 10", ""), ("43 + 10", ""), ("600 − 100", ""), ("100 + 100", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Real-world problems — mixed add/subtract
s2 = '<div class="wp">'\
'<p class="note">These are real situations. Think carefully about what to do.</p>'\
'<div class="mgrid c2">'
problems = [
("The zoo had 89 animals last month. This month, 23 new animals arrived but 15 animals were moved to another zoo. How many animals are at the zoo now?", "animals"),
("Lily read 34 pages of her book on Monday and 28 pages on Tuesday. The book has 100 pages total. How many pages does she still need to read?", "pages"),
("A farmer grew 67 carrots and 45 tomatoes in his garden. He sold 58 vegetables at the market. How many vegetables does he have left?", "vegetables"),
]
for text, unit in problems:
s2 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Draw or write your thinking: ' + bw() + '</p>'\
'<p>' + b("6em") + f' {unit}</p></div>'
s2 += '</div></div>'
# 3: Number Talk — reasoning WITHOUT calculating
s3 = '<div class="abox" style="background:#e3f2fd;">'\
'<p><b>Number Talk</b> — Explain WITHOUT calculating.</p>'\
'<div class="mgrid c2">'
s3 += '<div class="abox"><p>If 56 + 34 = 90, what is 56 + 36?</p><p style="font-size:11px;">My thinking: ' + bw() + '</p></div>'
s3 += '<div class="abox"><p>If 83 − 27 = 56, what is 93 − 27?</p><p style="font-size:11px;">My thinking: ' + bw() + '</p></div>'
s3 += '</div></div>'
# 4: Two-step problem
s4 = '<div class="abox">' \
'<p class="note">Solve step by step.</p>' \
'<div class="wp">'
s4 += '<p style="font-size:0.95em;">Emma has 48 crayons. She buys 27 more at the store. Then she gives 19 crayons to her little brother for his birthday. How many crayons does Emma have now?</p>'
s4 += '<p style="font-size:11px;">Step 1: After buying more: ' + b("4em") + '</p>'
s4 += '<p style="font-size:11px;">Step 2: After giving away: ' + b("4em") + ' crayons</p>'
s4 += '<div class="draw-box" style="min-height:50px;"></div></div></div>'
# 5: Open-ended challenge — Create your own
s5 = '<div class="abox" style="background:#f3e5f5;">'\
'<p><b>Create Your Own Problem</b></p>'\
'<p>Write a word problem that has TWO steps — one addition and one subtraction. Use a topic you enjoy (sports, animals, food, etc.). Then solve it.</p>'\
'<p style="min-height:60px; border-bottom:1px solid #333;"></p>'\
'<p style="min-height:30px; border-bottom:1px solid #333;"></p>'\
'<p style="font-size:11px;">Step 1: ' + b("5em") + '</p>'\
'<p style="font-size:11px;">Step 2: ' + b("5em") + '</p>'\
'</div>'
return page(11, "Thursday", "Application & Open-Ended Challenges",
f'''{sec(1, "Warm-up: ±10 and ±100", s1)}
{sec(2, "Real-World Word Problems", s2)}
{sec(3, "Number Talk: Connected Problems", s3)}
{sec(4, "Two-Step Problem", s4)}
{sec(5, "Challenge: Create Your Own", s5)}''')
# ═══════════════════════════════════════════════════
# FRIDAY — Review & Self-Check
# ═══════════════════════════════════════════════════
def friday():
# 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. Go fast!</p>'\
'<div class="mgrid c3">'
for expr in [("76 − 10", ""), ("52 + 10", ""), ("300 + 100", ""), ("500 − 100", "")]:
s1 += f'<div class="abox"><p>{expr[0]} = {b("4em")}</p></div>'
s1 += '</div></div>'
# 2: Estimation warm-up
s2 = '<div class="abox" style="background:#fff3e0;">'\
'<p><b>Estimate First!</b> Round to tens, estimate, then solve.</p>'\
'<div class="mgrid c2">'
for a, op, c in [(48, "+", 36), (73, "−", 28), (55, "+", 39), (92, "−", 47)]:
at = (a + 5) // 10 * 10
ct = (c + 5) // 10 * 10
s2 += f'<div class="abox"><p><b>{a} {op} {c}</b></p>'\
f'<p>Estimate ({at} {op} {ct}): {b("4em")}</p>'\
f'<p>Actual: {b("4em")}</p></div>'
s2 += '</div></div>'
# 3: Mixed review — choose add or subtract
s3 = '<p class="note">Solve each. Think about whether to add or subtract.</p>'\
'<div class="mgrid c3">'
problems = [
"37 + 45 = ", "82 − 36 = ", "29 + 56 = ", "68 − 29 = "
]
for prob in problems:
s3 += f'<div class="abox"><p style="font-size:1.1em;">{prob}{b("5em")}</p></div>'
s3 += '</div>'
# 4: Word problem review
s4 = '<div class="wp">'\
'<p class="note">Read carefully. Show your work.</p>'\
'<div class="mgrid c2">'
problems = [
("A park had 54 benches. The city added 36 new benches. How many benches are in the park now?", 90, "benches"),
("The candy store had 78 chocolate bars. Customers bought 43 bars. How many bars are left?", 35, "bars"),
]
for text, _, unit in problems:
s4 += f'<div class="abox"><p style="font-size:0.95em;">{text}</p>'\
'<p style="font-size:11px;">Draw or write your thinking: ' + bw() + '</p>'\
'<p>' + b("6em") + f' {unit}</p></div>'
s4 += '</div></div>'
# 5: Self-check with reflection
s5 = '<div class="selfcheck">'\
'<p><b>Self-Check: How do you feel about mixed addition and subtraction?</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>Deciding Add or Subtract</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>Using Different Strategies</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>Solving Word Problems</b></p>'\
'<p>😊 I got it! | 😐 Getting there | 😟 Need help</p>'\
'</div>'\
'</div>'\
'<p style="margin-top:10px;"><b>One thing I learned this week:</b> ' + bl() + '</p>'\
'<p><b>One thing I want to practice more:</b> ' + bl() + '</p>'\
'<p><b>My favorite strategy:</b> ' + bl() + '</p>'\
'</div>'
return page(11, "Friday", "Week 11 Review & Self-Check",
f'''{sec(1, "Warm-up: ±10 and ±100", s1)}
{sec(2, "Estimate First!", s2)}
{sec(3, "Mixed Review", s3)}
{sec(4, "Word Problems", s4)}
{sec(5, "Self-Check & Reflection", s5)}''')
# ═══════════════════════════════════════════════════
# TEACHER GUIDE — Combined for all days
# ═══════════════════════════════════════════════════
def teacher_guide():
"""Generate combined teacher guide for all 5 days."""
return tg_page_multi(
"Week 11", "Mixed 2-Digit Addition & Subtraction — Teacher Guide",
# Monday
tg_section_title("Monday: Decide: Add or Subtract?") +
tg_sec(1, "Warm-up ±10", ["52, 65, 46, 78"]) +
tg_sec(2, "Number Talk", ["ADD (getting more), SUBTRACT (flying away), ADD (adding more), SUBTRACT (eating)"]) +
tg_sec(3, "Mixed Practice", ["63, 44, 83, 46"]) +
tg_sec(4, "Missing Numbers", ["7, 27, 48, 34"]) +
tg_sec(5, "Challenge", ["Various — accept any interesting problems"]) +
tg_note("Page break"),
# Tuesday
tg_section_title("Tuesday: Multiple Strategies") +
tg_sec(1, "Warm-up", ["63, 68, 300, 300"]) +
tg_sec(2, "Estimation", ["Est 40+30=70, actual 65 / Est 70−30=40, actual 37 / Est 40+40=80, actual 83 / Est 80−40=40, actual 46"]) +
tg_sec(3, "Two Strategies", ["73, 35, 93, 46"]) +
tg_sec(4, "Word Problems", ["55 brushes (36+27−8), 72 passengers (84−31+19)"]) +
tg_sec(5, "Number Talk", ["Same sum (45+38 = 48+35 = 83)", "72−24 is bigger (subtracting less)"]) +
tg_note("Page break"),
# Wednesday
tg_section_title("Wednesday: Problem Solving") +
tg_sec(1, "Warm-up", ["57, 44, 45, 33"]) +
tg_sec(2, "Column Practice", ["63, 83, 44, 46"]) +
tg_sec(3, "Word Problems", ["92 cookies, 48 books, 65 marbles"]) +
tg_sec(4, "Find Error", ["28+45=73 not 63 (forgot to carry 1)", "64−37=27 not 33 (borrowing error)"]) +
tg_sec(5, "Even/Odd", ["63(odd), 35(odd), 83(odd)"]) +
tg_note("Page break"),
# Thursday
tg_section_title("Thursday: Application & Challenges") +
tg_sec(1, "Warm-up", ["71, 53, 500, 200"]) +
tg_sec(2, "Real-World Problems", ["97 animals (89+23−15), 38 pages (100−34−28), 54 vegetables (67+45−58)"]) +
tg_sec(3, "Number Talk", ["56+36=92 (two more)", "93−27=66 (ten more)"]) +
tg_sec(4, "Two-Step", ["Step 1: 48+27=75, Step 2: 75−19=56 crayons"]) +
tg_sec(5, "Create Own", ["Accept student-created two-step problems"]) +
tg_note("Page break"),
# Friday
tg_section_title("Friday: Review & Self-Check") +
tg_sec(1, "Warm-up", ["66, 62, 400, 400"]) +
tg_sec(2, "Estimation", ["Est 50+40=90, actual 84 / Est 70−30=40, actual 45 / Est 60+40=100, actual 94 / Est 90−50=40, actual 45"]) +
tg_sec(3, "Mixed Review", ["82, 46, 85, 39"]) +
tg_sec(4, "Word Problems", ["90 benches, 35 bars"]) +
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)
for f in glob.glob(os.path.join(WEEK, "*.html")):
os.remove(f)
days = [
(monday, "Monday", "Decide: Add or Subtract?"),
(tuesday, "Tuesday", "Multiple Strategies for Mixed Operations"),
(wednesday, "Wednesday", "Problem Solving with Mixed Operations"),
(thursday, "Thursday", "Application & Open-Ended Challenges"),
(friday, "Friday", "Week 11 Review & Self-Check"),
]
for lesson_func, day, title in days:
html = lesson_func()
fname = f"Week_11_{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_11_Teacher_Guide.html")
with open(path, "w") as f:
f.write(html)
pdf_path = os.path.join(WEEK, "Week_11_Teacher_Guide.pdf")
HTML(filename=path).write_pdf(pdf_path)
print(f"Generated: {pdf_path}")
print("\nWeek 11 (rewritten to new standard) complete!")