Add the Claude tutor, idea levels and parent area
Browse files- app.py +171 -8
- data/chapters/0417_ch04.json +1 -0
- data/chapters/0455_ch2_elasticity_and_market_system.json +1 -0
- data/chapters/0610_ch05.json +1 -0
- data/chapters/0620_ch04.json +1 -0
- data/chapters/0620_ch05.json +1 -0
- data/chapters/0625_ch03.json +1 -0
- requirements.txt +1 -0
- static/index.html +180 -8
- tools/build_tutor_data.py +76 -0
- tutor.py +339 -0
app.py
CHANGED
|
@@ -52,6 +52,10 @@ class Store:
|
|
| 52 |
self.lock = threading.Lock()
|
| 53 |
self.students: dict[str, dict] = {}
|
| 54 |
self.attempts: list[dict] = []
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
self.api = None
|
| 56 |
if HF_TOKEN and RESULTS_REPO:
|
| 57 |
from huggingface_hub import HfApi
|
|
@@ -59,6 +63,42 @@ class Store:
|
|
| 59 |
self.api = HfApi(token=HF_TOKEN)
|
| 60 |
self.api.create_repo(RESULTS_REPO, repo_type="dataset", private=True, exist_ok=True)
|
| 61 |
self._load()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
def _load(self) -> None:
|
| 64 |
if self.api:
|
|
@@ -71,11 +111,17 @@ class Store:
|
|
| 71 |
sp = root / "students.json"
|
| 72 |
if sp.exists():
|
| 73 |
self.students = json.loads(sp.read_text(encoding="utf-8"))
|
| 74 |
-
for
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
def _write(self, path_in_repo: str, obj: dict, message: str) -> None:
|
| 81 |
data = json.dumps(obj, ensure_ascii=False, indent=1).encode("utf-8")
|
|
@@ -129,6 +175,19 @@ def load_sets() -> dict[str, dict]:
|
|
| 129 |
|
| 130 |
SETS = load_sets()
|
| 131 |
STORE = Store()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
|
| 134 |
def check_pin(pin: str | None) -> None:
|
|
@@ -138,6 +197,13 @@ def check_pin(pin: str | None) -> None:
|
|
| 138 |
raise HTTPException(401, "That PIN is not right. Check it with your parent.")
|
| 139 |
|
| 140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
# ---------------------------------------------------------------- api
|
| 142 |
class StudentIn(BaseModel):
|
| 143 |
name: str = Field(min_length=1, max_length=40)
|
|
@@ -208,14 +274,104 @@ def add_attempt(body: AttemptIn, x_pin: str | None = Header(default=None)) -> di
|
|
| 208 |
"score": score, "max": total, "answers": answers, "atoms": atoms,
|
| 209 |
}
|
| 210 |
try:
|
| 211 |
-
|
| 212 |
except Exception as e: # hub write failed twice
|
| 213 |
raise HTTPException(502, "Couldn't save to the results store just now. Try again in a minute.") from e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
|
| 215 |
|
| 216 |
@app.get("/api/export/{kind}.csv")
|
| 217 |
def export(kind: str, pin: str = Query(default="")) -> Response:
|
| 218 |
-
|
| 219 |
buf = io.StringIO()
|
| 220 |
w = csv.writer(buf)
|
| 221 |
names = {k: v["name"] for k, v in STORE.students.items()}
|
|
@@ -253,6 +409,13 @@ def export(kind: str, pin: str = Query(default="")) -> Response:
|
|
| 253 |
cur[3] += 1
|
| 254 |
for (sid, subj, at), (g, m, idea, n) in sorted(agg.items(), key=lambda kv: (kv[0][0], kv[1][0] / kv[1][1] if kv[1][1] else 0)):
|
| 255 |
w.writerow([names.get(sid, sid), subj, at, idea, g, m, round(100 * g / m) if m else 0, n])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
else:
|
| 257 |
raise HTTPException(404, "Unknown export.")
|
| 258 |
stamp = datetime.now().strftime("%Y-%m-%d")
|
|
@@ -263,4 +426,4 @@ def export(kind: str, pin: str = Query(default="")) -> Response:
|
|
| 263 |
@app.get("/healthz")
|
| 264 |
def health() -> dict:
|
| 265 |
return {"ok": True, "sets": len(SETS), "students": len(STORE.students), "attempts": len(STORE.attempts),
|
| 266 |
-
"storage": "hf-dataset" if STORE.api else "local"}
|
|
|
|
| 52 |
self.lock = threading.Lock()
|
| 53 |
self.students: dict[str, dict] = {}
|
| 54 |
self.attempts: list[dict] = []
|
| 55 |
+
self.mastery: dict[str, dict] = {} # student id -> atom id -> state
|
| 56 |
+
self.chats: dict[str, dict] = {} # session id -> session
|
| 57 |
+
self.dirty: dict[str, dict] = {} # path in repo -> object, flushed in batches
|
| 58 |
+
self.dirty_lock = threading.Lock()
|
| 59 |
self.api = None
|
| 60 |
if HF_TOKEN and RESULTS_REPO:
|
| 61 |
from huggingface_hub import HfApi
|
|
|
|
| 63 |
self.api = HfApi(token=HF_TOKEN)
|
| 64 |
self.api.create_repo(RESULTS_REPO, repo_type="dataset", private=True, exist_ok=True)
|
| 65 |
self._load()
|
| 66 |
+
threading.Thread(target=self._flusher, daemon=True).start()
|
| 67 |
+
|
| 68 |
+
def queue_write(self, path_in_repo: str, obj: dict) -> None:
|
| 69 |
+
"""Chats and idea levels change every message; save them in one commit per minute."""
|
| 70 |
+
with self.dirty_lock:
|
| 71 |
+
self.dirty[path_in_repo] = obj
|
| 72 |
+
|
| 73 |
+
def flush(self) -> int:
|
| 74 |
+
with self.dirty_lock:
|
| 75 |
+
batch, self.dirty = self.dirty, {}
|
| 76 |
+
if not batch:
|
| 77 |
+
return 0
|
| 78 |
+
try:
|
| 79 |
+
if self.api:
|
| 80 |
+
from huggingface_hub import CommitOperationAdd
|
| 81 |
+
|
| 82 |
+
ops = [CommitOperationAdd(path_in_repo=p, path_or_fileobj=json.dumps(o, ensure_ascii=False).encode("utf-8"))
|
| 83 |
+
for p, o in batch.items()]
|
| 84 |
+
self.api.create_commit(RESULTS_REPO, operations=ops, repo_type="dataset",
|
| 85 |
+
commit_message=f"Save {len(ops)} chat/level files")
|
| 86 |
+
else:
|
| 87 |
+
for p, o in batch.items():
|
| 88 |
+
f = LOCAL / p
|
| 89 |
+
f.parent.mkdir(parents=True, exist_ok=True)
|
| 90 |
+
f.write_text(json.dumps(o, ensure_ascii=False), encoding="utf-8")
|
| 91 |
+
except Exception:
|
| 92 |
+
with self.dirty_lock: # keep anything newer, put the failed batch back
|
| 93 |
+
for p, o in batch.items():
|
| 94 |
+
self.dirty.setdefault(p, o)
|
| 95 |
+
return -1
|
| 96 |
+
return len(batch)
|
| 97 |
+
|
| 98 |
+
def _flusher(self) -> None:
|
| 99 |
+
while True:
|
| 100 |
+
time.sleep(60)
|
| 101 |
+
self.flush()
|
| 102 |
|
| 103 |
def _load(self) -> None:
|
| 104 |
if self.api:
|
|
|
|
| 111 |
sp = root / "students.json"
|
| 112 |
if sp.exists():
|
| 113 |
self.students = json.loads(sp.read_text(encoding="utf-8"))
|
| 114 |
+
for sub, sink in (("attempts", None), ("mastery", self.mastery), ("chats", self.chats)):
|
| 115 |
+
folder = root / sub
|
| 116 |
+
for f in sorted(folder.glob("*.json")) if folder.exists() else []:
|
| 117 |
+
try:
|
| 118 |
+
obj = json.loads(f.read_text(encoding="utf-8"))
|
| 119 |
+
except json.JSONDecodeError:
|
| 120 |
+
continue
|
| 121 |
+
if sink is None:
|
| 122 |
+
self.attempts.append(obj)
|
| 123 |
+
else:
|
| 124 |
+
sink[f.stem] = obj
|
| 125 |
|
| 126 |
def _write(self, path_in_repo: str, obj: dict, message: str) -> None:
|
| 127 |
data = json.dumps(obj, ensure_ascii=False, indent=1).encode("utf-8")
|
|
|
|
| 175 |
|
| 176 |
SETS = load_sets()
|
| 177 |
STORE = Store()
|
| 178 |
+
PARENT_PIN = os.environ.get("PARENT_PIN", "")
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
def _anthropic_client():
|
| 182 |
+
import anthropic
|
| 183 |
+
|
| 184 |
+
return anthropic.Anthropic(max_retries=3, timeout=180.0)
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
from tutor import CHAPTERS, Tutor, apply_selfcheck # noqa: E402
|
| 188 |
+
|
| 189 |
+
TUTOR = Tutor(STORE, STORE.students, _anthropic_client)
|
| 190 |
+
TUTOR_ON = bool(os.environ.get("ANTHROPIC_API_KEY"))
|
| 191 |
|
| 192 |
|
| 193 |
def check_pin(pin: str | None) -> None:
|
|
|
|
| 197 |
raise HTTPException(401, "That PIN is not right. Check it with your parent.")
|
| 198 |
|
| 199 |
|
| 200 |
+
def check_parent(pin: str | None) -> None:
|
| 201 |
+
if not PARENT_PIN:
|
| 202 |
+
raise HTTPException(503, "The parent PIN is not set up yet.")
|
| 203 |
+
if not pin or not secrets.compare_digest(pin.strip(), PARENT_PIN):
|
| 204 |
+
raise HTTPException(401, "That parent PIN is not right.")
|
| 205 |
+
|
| 206 |
+
|
| 207 |
# ---------------------------------------------------------------- api
|
| 208 |
class StudentIn(BaseModel):
|
| 209 |
name: str = Field(min_length=1, max_length=40)
|
|
|
|
| 274 |
"score": score, "max": total, "answers": answers, "atoms": atoms,
|
| 275 |
}
|
| 276 |
try:
|
| 277 |
+
saved = STORE.add_attempt(rec)
|
| 278 |
except Exception as e: # hub write failed twice
|
| 279 |
raise HTTPException(502, "Couldn't save to the results store just now. Try again in a minute.") from e
|
| 280 |
+
m = STORE.mastery.setdefault(body.studentId, {})
|
| 281 |
+
apply_selfcheck(m, body.setId, saved)
|
| 282 |
+
STORE.queue_write(f"mastery/{body.studentId}.json", m)
|
| 283 |
+
return saved
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
# ---------------------------------------------------------------- tutor
|
| 287 |
+
class TutorStart(BaseModel):
|
| 288 |
+
studentId: str
|
| 289 |
+
setId: str
|
| 290 |
+
mode: str = Field(pattern="^(practice|chat)$")
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
class TutorMsg(BaseModel):
|
| 294 |
+
sessionId: str
|
| 295 |
+
text: str = Field(min_length=1, max_length=2000)
|
| 296 |
+
confidence: str | None = Field(default=None, pattern="^(guess|think so|sure)$")
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
def _tutor_call(fn, *a):
|
| 300 |
+
import anthropic
|
| 301 |
+
|
| 302 |
+
try:
|
| 303 |
+
return fn(*a)
|
| 304 |
+
except anthropic.RateLimitError as e:
|
| 305 |
+
raise HTTPException(429, "The tutor is busy. Wait a minute and try again.") from e
|
| 306 |
+
except anthropic.APIConnectionError as e:
|
| 307 |
+
raise HTTPException(502, "The tutor can't be reached right now. Check the connection and try again.") from e
|
| 308 |
+
except anthropic.APIStatusError as e:
|
| 309 |
+
raise HTTPException(502, "The tutor hit a problem. Try again in a moment.") from e
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
@app.get("/api/tutor/status")
|
| 313 |
+
def tutor_status(x_pin: str | None = Header(default=None)) -> dict:
|
| 314 |
+
check_pin(x_pin)
|
| 315 |
+
return {"enabled": TUTOR_ON, "chapters": [c for c in CHAPTERS if c in SETS]}
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
@app.get("/api/mastery/{student_id}")
|
| 319 |
+
def mastery(student_id: str, x_pin: str | None = Header(default=None)) -> dict:
|
| 320 |
+
check_pin(x_pin)
|
| 321 |
+
m = STORE.mastery.get(student_id, {})
|
| 322 |
+
out = {}
|
| 323 |
+
for cid, ch in CHAPTERS.items():
|
| 324 |
+
levels = [m.get(a["id"], {}).get("level", 0) for a in ch["atoms"]]
|
| 325 |
+
out[cid] = {"atoms": len(levels), "byLevel": [levels.count(i) for i in range(5)]}
|
| 326 |
+
return out
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
@app.post("/api/tutor/start")
|
| 330 |
+
def tutor_start(body: TutorStart, x_pin: str | None = Header(default=None)) -> dict:
|
| 331 |
+
check_pin(x_pin)
|
| 332 |
+
if not TUTOR_ON:
|
| 333 |
+
raise HTTPException(503, "The tutor isn't switched on yet.")
|
| 334 |
+
if body.studentId not in STORE.students or body.setId not in CHAPTERS:
|
| 335 |
+
raise HTTPException(404, "Pick your name and a chapter first.")
|
| 336 |
+
return _tutor_call(TUTOR.start, body.studentId, body.setId, body.mode)
|
| 337 |
+
|
| 338 |
+
|
| 339 |
+
@app.post("/api/tutor/message")
|
| 340 |
+
def tutor_message(body: TutorMsg, x_pin: str | None = Header(default=None)) -> dict:
|
| 341 |
+
check_pin(x_pin)
|
| 342 |
+
if body.sessionId not in STORE.chats:
|
| 343 |
+
raise HTTPException(404, "That chat has ended. Start a new one.")
|
| 344 |
+
return _tutor_call(TUTOR.message, body.sessionId, body.text.strip(), body.confidence)
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
# ---------------------------------------------------------------- parent
|
| 348 |
+
@app.get("/api/parent/chats")
|
| 349 |
+
def parent_chats(x_parent_pin: str | None = Header(default=None)) -> list:
|
| 350 |
+
check_parent(x_parent_pin)
|
| 351 |
+
names = {k: v["name"] for k, v in STORE.students.items()}
|
| 352 |
+
out = []
|
| 353 |
+
for s in STORE.chats.values():
|
| 354 |
+
ch = CHAPTERS.get(s["setId"], {})
|
| 355 |
+
out.append({"id": s["id"], "student": names.get(s["studentId"], s["studentId"]), "studentId": s["studentId"],
|
| 356 |
+
"subject": ch.get("subject", ""), "chapter": ch.get("chapter", s["setId"]), "mode": s["mode"],
|
| 357 |
+
"started": s["started"], "updated": s["updated"], "messages": len(s["transcript"]),
|
| 358 |
+
"attempts": len(s["attempts"]), "correct": sum(1 for a in s["attempts"] if a.get("correct")),
|
| 359 |
+
"flags": s["flags"], "usage": s["usage"]})
|
| 360 |
+
return sorted(out, key=lambda x: x["updated"], reverse=True)
|
| 361 |
+
|
| 362 |
+
|
| 363 |
+
@app.get("/api/parent/chats/{sid}")
|
| 364 |
+
def parent_chat(sid: str, x_parent_pin: str | None = Header(default=None)) -> dict:
|
| 365 |
+
check_parent(x_parent_pin)
|
| 366 |
+
s = STORE.chats.get(sid)
|
| 367 |
+
if not s:
|
| 368 |
+
raise HTTPException(404, "No such chat.")
|
| 369 |
+
return {k: s[k] for k in ("id", "studentId", "setId", "mode", "started", "updated", "transcript", "attempts", "flags", "usage")}
|
| 370 |
|
| 371 |
|
| 372 |
@app.get("/api/export/{kind}.csv")
|
| 373 |
def export(kind: str, pin: str = Query(default="")) -> Response:
|
| 374 |
+
check_parent(pin)
|
| 375 |
buf = io.StringIO()
|
| 376 |
w = csv.writer(buf)
|
| 377 |
names = {k: v["name"] for k, v in STORE.students.items()}
|
|
|
|
| 409 |
cur[3] += 1
|
| 410 |
for (sid, subj, at), (g, m, idea, n) in sorted(agg.items(), key=lambda kv: (kv[0][0], kv[1][0] / kv[1][1] if kv[1][1] else 0)):
|
| 411 |
w.writerow([names.get(sid, sid), subj, at, idea, g, m, round(100 * g / m) if m else 0, n])
|
| 412 |
+
elif kind == "chats":
|
| 413 |
+
w.writerow(["session_id", "student", "subject", "chapter", "mode", "time", "who", "confidence", "text"])
|
| 414 |
+
for s in sorted(STORE.chats.values(), key=lambda x: x["started"]):
|
| 415 |
+
ch = CHAPTERS.get(s["setId"], {})
|
| 416 |
+
for m in s["transcript"]:
|
| 417 |
+
w.writerow([s["id"], names.get(s["studentId"], s["studentId"]), ch.get("subject", ""), ch.get("chapter", ""),
|
| 418 |
+
s["mode"], m["t"], m["role"], m.get("confidence") or "", m["text"]])
|
| 419 |
else:
|
| 420 |
raise HTTPException(404, "Unknown export.")
|
| 421 |
stamp = datetime.now().strftime("%Y-%m-%d")
|
|
|
|
| 426 |
@app.get("/healthz")
|
| 427 |
def health() -> dict:
|
| 428 |
return {"ok": True, "sets": len(SETS), "students": len(STORE.students), "attempts": len(STORE.attempts),
|
| 429 |
+
"chats": len(STORE.chats), "tutor": TUTOR_ON, "storage": "hf-dataset" if STORE.api else "local"}
|
data/chapters/0417_ch04.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"id": "0417_ch04", "subject": "ICT", "code": "0417", "chapter": "Networks and the effects of using them", "text": "Status: model-generated, unreviewed by a subject teacher. Generated 2 Oct 2026.\n\n# 0417 ICT — Chapter 4: Networks and the effects of using them (syllabus 4.1, 4.2)\n\nScope: all of syllabus section 4 (no Core/Supplement split in 0417). Statement ids 4.1.1–4.2.5 are our numbering of the official headings (see the coverage matrix). Section 8.3 (two-factor authentication, encryption, firewalls) is border content. Numbered paragraphs [P1]… are the anchors the knowledge atoms point to. Stage-1 pipeline text; see ATOMS_PLAN.md.\n\n## A. The problem the chapter solves\n\n[P1] A computer on its own can use only what is stored inside it. Connecting computers lets them share files, printers, software and an internet connection, and lets people communicate. Once data leaves a machine, three problems appear. **Delivery**: the data must reach the right device and no other. **Reach**: a cable or radio signal only goes so far, so networks must be joined. **Trust**: data in transit can be read or altered, and anyone who can connect may pretend to be someone else. Section 4.1 deals with delivery and reach; section 4.2 with trust and with one major use of networks, electronic conferencing. Almost every question in this chapter is one of these problems applied to a scenario.\n\n## B. Delivery: addresses and packets\n\n[P2] Data crosses a network as small **data packets**. Each carries part of the data plus a header holding the sender's and the destination's addresses, so packets can travel separately and be reassembled. A **MAC address** is a unique identifier fixed into a device's network hardware when it is made; it identifies the device on a local network. An **IP address** (Internet Protocol address) identifies a device's location on a network or the internet; each device on a network must have a different one, and it changes if the device joins another network. The MAC address says *which device*; the IP address says *where it is*. An IP address identifies a device, not a person.\n\n[P3] A device cannot join a network without a **network interface card (NIC)**: the circuit board (often built into the motherboard) that connects it to a network, prepares, sends, receives and controls the flow of data, and carries the device's MAC address. A wireless NIC does the same by radio. The NIC connects a device to the *local* network; connecting to the internet is the router's job (P6).\n\n## C. Joining devices inside one network\n\n[P4] A **hub** joins devices into a network: data arriving at one port is **broadcast to every connected device**, and each device checks whether it is the recipient. Because it cannot tell devices apart, a hub creates unnecessary traffic, wastes bandwidth, slows as the network grows and lets every device see others' data. A **switch** learns the MAC address of the device on each port, reads the destination MAC address of incoming data and **sends it only to that device**, reducing traffic and improving security. Hub broadcasts to all; switch sends to one, *because it reads MAC addresses*.\n\n[P5] A **bridge** joins two segments of a network that use the **same protocol** so they act as one LAN. It does not connect to the internet and does not choose routes; it only decides whether data needs to cross between the segments.\n\n## D. Reach: leaving the local network\n\n[P6] A **router** connects a local network to other networks, above all to a WAN such as the internet. The syllabus names its three operations, and Paper 1 asks for them by name: **connecting networks and devices to the internet** (usually via a modem); **storing computer addresses** (the IP addresses of local devices and the routes in its **routing table**); and **routing data packets**. Home routers also contain a switch and a wireless access point, but exam questions treat the functions separately.\n\n[P7] To route a packet, the router reads the **destination IP address** in its header, looks it up in its **routing table** (a stored list of network addresses and the best path to each) and forwards the packet to the next router on the best route; if the address is not listed it uses a **default route**. Router passes to router until the packet reaches the destination network. Incoming packets are directed to the right local device by its IP address. A bridge joins LANs of the same kind; a router joins a LAN to a WAN and chooses routes.\n\n## E. Wireless links: wi-fi and Bluetooth\n\n[P8] **Wi-fi** connects devices to a network by radio waves through a **wireless access point** (usually in the router). Its range is tens of metres (around 100 m in the open), it supports many devices and gives high data rates, so it connects laptops, phones, smart TVs and printers to a LAN and the internet; public **hotspots** extend this to cafés and airports. It is secured by a network password and by encrypting the data.\n\n[P9] **Bluetooth** also uses radio, but for **short-range, device-to-device** links (about 10 m), with low power use and a lower data rate. It hops between 79 channels to avoid interference. Uses: wireless headphones and speakers, keyboards and mice, printing from a phone, linking a phone to a car, sending files between two nearby devices.\n\n[P10] **Connecting a device** is marked one step per mark. *Wi-fi:* open settings; choose connect to a network; the device lists available networks; select one; enter the password; click connect (an error message appears if it fails). *Bluetooth:* switch on Bluetooth in the computer's settings and switch on the device (press its pairing button); bring them close; the computer scans for devices; select the device from the list; **pair** (sometimes confirming a code). Pairing is a one-off agreement between two specific devices, not joining a shared network.\n\n[P11] **Similarities:** both are wireless, use radio waves (both can use 2.4 GHz), free devices from cables and can be secured by encryption and a code. **Differences:** wi-fi has much greater range and speed, supports many devices and connects a device to a network and the internet through an access point; Bluetooth has short range, lower speed and power, few devices at once, and links two devices directly. Wi-fi for a smart TV streaming films; Bluetooth for headphones.\n\n## F. Network types\n\n[P12] A **LAN** (Local Area Network) covers a small geographical area such as a building or site, is usually owned by one organisation and links devices by cable through switches. A **WLAN** (Wireless LAN) is a LAN whose devices connect by radio through wireless access points, for example across a hotel site. A **WAN** (Wide Area Network) covers a **large geographical area** — a country or the world — by connecting LANs through leased lines, telephone networks or satellites; the internet is the largest WAN. A LAN is faster, cheaper and easier to secure than a WAN; a WLAN avoids cabling and lets users move but is slower, shorter-range and more open to interference and eavesdropping than a cabled LAN. Mark schemes want the area stated as geography, not just \"bigger\".\n\n## G. Network environments: internet, intranet, extranet\n\n[P13] The **internet** is a worldwide network of networks (a WAN): owned by nobody, open to anyone with a connection, anyone can publish on it, and it is available all the time; the World Wide Web runs on it. An **intranet** is a *private* network using the same technologies (web pages, browsers, internet protocols) but accessible only to members of one organisation, behind logins and a firewall; it holds internal news, policies, forms and documents. An **extranet** extends an organisation's intranet to **authorised outsiders** — customers, suppliers, partners — over the internet, with a username and password: a supplier checking stock, a parent viewing reports.\n\n[P14] Questions ask for both sides. *Similarities:* all use internet technologies and can hold web pages; intranet and extranet both restrict access and sit behind security. *Differences:* who may access (anyone; members only; members plus authorised outsiders); ownership (nobody; an organisation); amount of information (the internet holds far more); trust and security (intranet content is controlled and more reliable; an extranet adds risk because outsiders log in). The commonest error is reading \"intranet\" as \"internet\".\n\n## H. Cloud computing\n\n[P15] **Cloud computing** stores data and runs software on **remote servers in data centres run by a third-party provider**, reached through the internet. Characteristics: storage and processing are rented by **subscription or pay-per-use**; capacity grows or shrinks on demand; data is reachable from any connected device anywhere; the provider keeps copies on several servers. A **public cloud** is shared by a provider's many customers; a **private cloud** is used and completely controlled by one organisation, with access restricted to its members (not \"a cloud for one person\"). Uses: storage and backup, sharing and collaborating on documents, running applications online, and cloud gaming, where the game runs remotely and is streamed to the player.\n\n[P16] **Stored:** the user uploads data; it is saved on remote servers and backed up to other servers. **Managed:** the provider maintains hardware, security and backups; the owner or administrator controls who can access what; files are **synced** so every device sees the latest version; changes are tracked and earlier versions kept; billing follows usage. **Shared:** the owner uploads the file and grants team members access; each logs into their cloud account, opens and edits it; edits save automatically and sync; a change history is kept. Moving a file from college to home is the same: log into the cloud account, upload, log in at home, download. \"Log in\" scores only as \"log into the *cloud account*\".\n\n[P17] **Cloud versus a hard disk, SSD or pen drive.** For the cloud: access from anywhere on many devices; easy sharing; nothing physical to lose or damage; automatic backup; expandable, pay for what you use. Against: it needs a **stable internet connection** (slow transfers otherwise); ongoing subscription; loss of control, as a third party holds the data, possibly under another country's laws; more copies kept for longer means more exposure to hacking; if the provider closes or the subscription lapses, data may be lost. Local storage is free after purchase and works offline but is limited and can be lost, stolen or damaged. \"Needs internet\" alone is too vague.\n\n## I. Trust 1: privacy and passwords\n\n[P18] **Privacy** means personal data is not seen by people who should not see it; **confidentiality** means transferred data is read only by its intended recipients. Data in transit can be intercepted, and passwords can be captured by spyware (key-logging software) or by watching (shoulder surfing). So networks check who is allowed in (P19–P24) and keep malicious software out (P25–P27). Encryption and firewalls also protect transfers but belong to section 8.3.\n\n[P19] A **strong password** is long (eight or more characters; longer is better), mixes upper- and lower-case letters, digits and symbols, and has no obvious sequence and nothing linked to the user. A **weak password** is short, uses one kind of character, is a word or keyboard sequence (QWERTY123), or contains personal details (a name plus birth year). Password-guessing programs try personal details, words and sequences first, and each extra character multiplies the guesses needed.\n\n[P20] **Avoiding interception and misuse:** keep **anti-spyware up to date** so key-logging software is detected and removed; **change passwords regularly** so a captured one soon stops working; use a **different password for each account**, because one cracked password would otherwise open them all; never share or write passwords down; beware shoulder surfing. Systems mask passwords and lock accounts after repeated wrong attempts. A **user ID** names the account and is unique; the password proves ownership — two users may share a password, never a user ID.\n\n[P21] **Trade-offs**, the substance of 6-mark questions. A very strong password is hard to crack but hard to remember, so it may be written down, typed slowly while looking at the keyboard, mistyped, or its characters confused (1 and l, 5 and S). Forced regular changes shorten the life of a stolen password, but users choose similar passwords, forget the current one and get locked out, or write them down. Good answers give each problem *and* its consequence.\n\n## J. Trust 2: other ways to prove identity\n\n[P22] Authentication uses something you **know** (password, PIN), **have** (card, token, phone) or **are** (biometric), or where you are (location). **Biometric methods** use a unique physical or behavioural feature: fingerprint, face, iris, retina, voice, hand geometry. For: unique, cannot be forgotten or lost, very hard (not impossible) to forge, need the person present, stop shoulder surfing. Against: expensive and slow to set up and enrol; misreads when a finger is wet or cut, a voice changes, the scanner is dirty or the room noisy; privacy concerns; a stolen biometric cannot be changed like a password.\n\n[P23] **Magnetic stripe cards** store data in a strip read by swiping: cheap and quick, but easily damaged by magnets, worn, easy to clone, and usable by whoever holds the card, so a PIN is often added. **Smart cards** hold a chip that stores data securely: more data, much harder to clone, can be contactless, usually with a PIN. A lost card must be cancelled.\n\n[P24] A **physical token** is a small hardware device that generates a **one-time passcode** valid for a short time, entered with the password as an extra layer of security. An **electronic token** does the same in software: an app or a code sent by text or email after login, single-use and short-lived. A stolen password is useless without the current code. **Zero login** needs no manual input: the system authenticates the user in the background from signals such as device, network, location and biometrics. For: nothing to forget or shoulder-surf; faster login. Against: runs constantly, using resources; privacy concerns; extra cost; access tied to the recognised user and device. Combining two different factors is **two-factor authentication** (8.3).\n\n## K. Trust 3: anti-malware\n\n[P25] **Malware** is malicious software: viruses, worms, Trojans, spyware, ransomware. **Anti-virus** software targets viruses; **anti-malware** covers the wider range. Both scan files and compare their code with a **database of known malware signatures**; **heuristic** checks also look for suspicious code or behaviour, catching new malware. The database changes daily, so the software works only if **kept up to date** — mark schemes require those words. A firewall controls network traffic; it does not scan files for viruses.\n\n[P26] When a scan finds an infected file, the software alerts the user and deletes it or **quarantines** it: moves it to a hidden, isolated area where it cannot run or spread and cannot be opened, then re-scans. Quarantine is used when deletion would be unsafe — typically infected **system files** the computer needs — or when the detection may be a false alarm. Questions have two halves, *detecting* (scan, match, alert) and *quarantining* (isolate, no access), and both earn marks.\n\n[P27] Incoming data is malware's main route, so scan **portable storage media** before opening or copying from them, and scan **downloads and email attachments** before opening (automatic scanning can be set); if clean, download or open; if infected, delete without opening. Uploading from a portable drive to a network: log on, connect the drive, scan it, copy the file, check it transferred correctly.\n\n## L. Electronic conferencing\n\n[P28] **Electronic conferencing** is real-time communication over a network between people in different places. Shared benefits: no travel time, travel or accommodation costs; meetings at short notice; safer than travelling; anyone anywhere can join. Shared drawbacks: a fast, **stable internet connection** is needed; time zones complicate scheduling; lag, freezing, lip-sync problems, echo and dropped connections; equipment and training cost; less personal, harder to build relationships or hold attention.\n\n[P29] **Video-conferencing** sends moving images and sound. Hardware: computer, **webcam**, **microphone**, **speakers** or headphones, **monitor** or large screen, router/internet connection. Software: conferencing software, **hardware drivers** for webcam and microphone, a **CODEC** to compress and decompress the audio and video streams, and **echo-cancellation** software so the microphone does not pick up the speakers. It is the richest form (body language, visual aids) but needs the most bandwidth and equipment.\n\n[P30] **Audio-conferencing** is voice only: participants join one call, often by dialling into a central system with a PIN, using telephones or computers. Hardware: telephone handset, or microphone and speakers; software: an audio-conferencing app, plus an internet connection on a computer. Versus video: simpler, less equipment and bandwidth (cheaper, less freezing), no lip-sync issues, more privacy; but no body language or visual aids, no way to tell who is paying attention, harder to know who speaks next.\n\n[P31] **Web-conferencing** (including webinars) runs in a browser or app over the internet: everyone sees the **same screen**, presentations and documents, with chat, polls and optional audio and video. Versus video-conferencing: less dedicated hardware and software, works on more devices, fewer lag problems. Versus meeting in person: saves travel and can be recorded, but every participant needs a suitable device and reliable connection, and motivation and safeguarding are harder. Brand names earn no credit.\n\n## M. Exam conventions for this chapter\n\n[P32] Paper 1 marks list points (\"two from\", \"max three from\"); only the first answers given are marked. **Discuss / evaluate / compare** questions (6 marks) need both sides, usually capped at five on one side. \"Describe how to connect / share\" questions earn one mark per distinct step, in order. Points must be specific: \"stable internet connection\", not \"internet\"; \"large geographical area\", not \"bigger\"; \"sends data to a specific device using its MAC address\", not \"connects computers\". Generic names only.\n\n## Coverage matrix\n\n| Id (ours) | Syllabus statement (official heading and notes, abridged) | Paragraphs |\n|---|---|---|\n| 4.1.1 | Router: operation and purpose — connecting networks and devices to the internet; storing computer addresses; routing data packets | P2, P6, P7 |\n| 4.1.2 | Common network devices: NIC, hubs, bridges, switches | P2, P3, P4, P5 |\n| 4.1.3 | Wi-fi and Bluetooth: uses; connecting a device by wi-fi and by Bluetooth; similarities and differences | P8, P9, P10, P11 |\n| 4.1.4 | Cloud computing: characteristics, uses and issues; how data is stored, managed and shared; advantages and disadvantages of cloud storage compared with other methods | P15, P16, P17 |\n| 4.1.5 | Common network environments: characteristics, uses and purpose of extranet, intranet and internet; differences and similarities | P13, P14 |\n| 4.1.6 | Network types: LAN, WLAN, WAN and the differences between them | P12 |\n| 4.2.1 | Security issues regarding data transfer: privacy and confidentiality of data transfer | P18 |\n| 4.2.2 | Passwords: avoiding interception (up-to-date anti-spyware, regular changes); strong versus weak passwords | P19, P20, P21 |\n| 4.2.3 | Other authentication methods: zero login, biometrics, magnetic stripes, smart cards, physical tokens, electronic tokens | P22, P23, P24 |\n| 4.2.4 | Anti-malware software: anti-malware and anti-virus; removing/quarantining viruses with up-to-date software; scanning storage media used to transfer data; scanning data/software when downloading | P25, P26, P27 |\n| 4.2.5 | Electronic conferencing: characteristics, uses, advantages and disadvantages of video-, audio- and web-conferencing; hardware, software and network connection for each | P28, P29, P30, P31 |\n| 8.3 (border) | Two-factor authentication; user ID and password; firewall and encryption (named only to mark the edge) | P20, P24, P25 |\n| — bridge, no statement | Why networks exist: delivery, reach, trust | P1 |\n| — bridge, no statement | Paper 1 marking conventions for this chapter | P32 |\n\nGaps: none — every 4.x statement has at least one paragraph. Scope notes: IP addresses, MAC addresses and routing tables are not named in the syllabus but are examined under 4.1.1/4.1.2 (w23_11 Q5; the 2024 router and switch questions), so P2 and P7 cover them. Two-factor authentication and user-ID questions sit in the same questions as 4.2.2/4.2.3 although their statement is 8.3; they are border content. Left out on purpose: encryption, firewalls, SSL, digital certificates, phishing and hacking (8.3); VoIP and mobile video calls (6.1); search engines, ISPs and the WWW in detail (10.2).\n", "atoms": [{"id": "0417-4-A01", "type": "concept", "statement": "Networks let devices share files, printers, software and an internet connection and let people communicate; once data leaves a device it must be delivered to the right place, reach other networks, and be trusted.", "why": "These three problems organise every device, network type and security measure in the chapter.", "prerequisites": [], "tier": "core", "paragraphs": "P1"}, {"id": "0417-4-A02", "type": "fact", "statement": "Data is sent across a network as packets; each packet carries part of the data plus a header with the sender and destination addresses.", "why": "Small addressed pieces can travel separately and be reassembled.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P2"}, {"id": "0417-4-A03", "type": "fact", "statement": "A MAC address is a unique identifier fixed into a device's network hardware at manufacture; it identifies the device on a local network.", "why": "Hardware identity does not change when the device moves.", "prerequisites": ["0417-4-A02"], "tier": "core", "paragraphs": "P2"}, {"id": "0417-4-A04", "type": "fact", "statement": "An IP address (Internet Protocol address) is unique on a network and identifies the location of a device (not a person); it can change when the device joins another network. MAC says which device, IP says where it is.", "why": "Routing needs a location, not just an identity.", "prerequisites": ["0417-4-A02", "0417-4-A03"], "tier": "core", "paragraphs": "P2"}, {"id": "0417-4-A05", "type": "fact", "statement": "A network interface card (NIC) is the circuit board that connects a device to a network: it prepares, sends, receives and controls the flow of data and gives the device its MAC address.", "why": "Without it a device has no physical link to the network.", "prerequisites": ["0417-4-A03"], "tier": "core", "paragraphs": "P3"}, {"id": "0417-4-A06", "type": "fact", "statement": "A hub connects devices into a network and broadcasts any data it receives to every connected device; it can repeat signals to extend the network.", "why": "A hub cannot tell devices apart, so it sends to all.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P4"}, {"id": "0417-4-A07", "type": "relationship", "statement": "Because a hub broadcasts to every device, it creates unnecessary traffic, wastes bandwidth, slows as the network grows and lets every device see data meant for others.", "why": "Every packet goes everywhere.", "prerequisites": ["0417-4-A06"], "tier": "core", "paragraphs": "P4"}, {"id": "0417-4-A08", "type": "fact", "statement": "A switch connects devices to form a LAN; it learns the MAC address of the device on each port, reads the destination MAC address of incoming data and sends it only to that device.", "why": "Reading MAC addresses lets it target one device.", "prerequisites": ["0417-4-A03"], "tier": "core", "paragraphs": "P4"}, {"id": "0417-4-A09", "type": "comparison", "statement": "Hub versus switch: a hub broadcasts to all devices, a switch sends to the specific device because it reads MAC addresses, so a switch reduces traffic and is more secure.", "why": "Same job, different intelligence.", "prerequisites": ["0417-4-A06", "0417-4-A08"], "tier": "core", "paragraphs": "P4"}, {"id": "0417-4-A10", "type": "fact", "statement": "A bridge joins two segments of a network that use the same protocol so that they act as a single LAN; it does not connect to the internet or choose routes.", "why": "It only decides whether data crosses between the segments.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P5"}, {"id": "0417-4-A11", "type": "fact", "statement": "A router has three named operations: connecting networks and devices to the internet (usually via a modem), storing computer addresses, and routing data packets.", "why": "The syllabus lists them; mark schemes use this wording.", "prerequisites": ["0417-4-A04"], "tier": "core", "paragraphs": "P6"}, {"id": "0417-4-A12", "type": "fact", "statement": "A routing table is a list stored in the router of network (IP) addresses and the best route to each, used to decide where each packet is sent next.", "why": "A router must look up where to send a packet.", "prerequisites": ["0417-4-A04"], "tier": "core", "paragraphs": "P6; P7"}, {"id": "0417-4-A13", "type": "procedure", "statement": "Routing a packet: the router reads the destination IP address, looks it up in its routing table, forwards the packet to the next router on the best route (default route if not listed), and this repeats until the packet reaches the destination network.", "why": "Each router only needs to know the next step.", "prerequisites": ["0417-4-A11", "0417-4-A12"], "tier": "core", "paragraphs": "P7"}, {"id": "0417-4-A14", "type": "comparison", "statement": "Bridge versus router: a bridge joins LANs that use the same protocol into one LAN; a router connects a LAN to a WAN such as the internet and chooses routes for packets.", "why": "Joining like with like versus reaching other networks.", "prerequisites": ["0417-4-A10", "0417-4-A11"], "tier": "core", "paragraphs": "P7"}, {"id": "0417-4-A15", "type": "fact", "statement": "Wi-fi connects devices to a network by radio waves through a wireless access point; range tens of metres, many devices, high data rate; used for laptops, phones, smart TVs and printers, and public hotspots; secured by password and encryption.", "why": "An access point shares one network connection over radio.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P8"}, {"id": "0417-4-A16", "type": "fact", "statement": "Bluetooth is short-range (about 10 m), low-power, lower-data-rate radio linking two devices directly, hopping across 79 channels; used for headphones, speakers, keyboards, mice, phone-to-car and file transfer between nearby devices.", "why": "Designed for personal devices close together.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P9"}, {"id": "0417-4-A17", "type": "procedure", "statement": "Connect by wi-fi: open settings, choose connect to a network, the device lists networks, select one, enter the password, click connect (error message if it fails).", "why": "Each step is one mark-scheme point.", "prerequisites": ["0417-4-A15"], "tier": "core", "paragraphs": "P10"}, {"id": "0417-4-A18", "type": "procedure", "statement": "Connect by Bluetooth: switch on Bluetooth in the computer settings and switch on the device (pairing button), bring them close, the computer scans and lists devices, select the device, pair (confirm a code if asked), connect. Pairing is a one-off link between two specific devices.", "why": "Bluetooth links devices, not networks.", "prerequisites": ["0417-4-A16"], "tier": "core", "paragraphs": "P10"}, {"id": "0417-4-A19", "type": "comparison", "statement": "Wi-fi and Bluetooth are both wireless radio links (both can use 2.4 GHz), remove cables and can be encrypted; wi-fi has greater range, speed and device count and joins a network through an access point, Bluetooth is short-range, lower-power and links two devices directly.", "why": "Same medium, different purpose.", "prerequisites": ["0417-4-A15", "0417-4-A16"], "tier": "core", "paragraphs": "P11"}, {"id": "0417-4-A20", "type": "relationship", "statement": "Choose wi-fi when a device needs a network or internet connection or high bandwidth (smart TV streaming); choose Bluetooth for a short-range link to a peripheral (headphones, keyboard).", "why": "Requirements of the link decide the technology.", "prerequisites": ["0417-4-A19"], "tier": "core", "paragraphs": "P11"}, {"id": "0417-4-A21", "type": "fact", "statement": "A LAN covers a small geographical area (a building or site), is usually owned by one organisation and connects devices by cable through switches.", "why": "Local ownership and short cables.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P12"}, {"id": "0417-4-A22", "type": "fact", "statement": "A WLAN is a LAN whose devices connect by radio through wireless access points, for example across a hotel or school site.", "why": "A LAN without cables.", "prerequisites": ["0417-4-A21", "0417-4-A15"], "tier": "core", "paragraphs": "P12"}, {"id": "0417-4-A23", "type": "fact", "statement": "A WAN covers a large geographical area (a country or the world) by connecting LANs through leased lines, telephone networks or satellites; the internet is the largest WAN.", "why": "Distance needs public or leased links.", "prerequisites": ["0417-4-A21"], "tier": "core", "paragraphs": "P12"}, {"id": "0417-4-A24", "type": "comparison", "statement": "LAN versus WLAN versus WAN: a LAN is faster, cheaper and easier to secure than a WAN; a WLAN gives mobility without cabling but is slower, shorter-range and more open to interference and eavesdropping than a cabled LAN.", "why": "Area and medium drive speed, cost and security.", "prerequisites": ["0417-4-A21", "0417-4-A22", "0417-4-A23"], "tier": "core", "paragraphs": "P12"}, {"id": "0417-4-A25", "type": "fact", "statement": "The internet is a worldwide network of networks (a WAN): owned by nobody, open to anyone with a connection, anyone can publish, available 24/7; the WWW runs on it.", "why": "Public by design.", "prerequisites": ["0417-4-A23"], "tier": "core", "paragraphs": "P13"}, {"id": "0417-4-A26", "type": "fact", "statement": "An intranet is a private network using internet technologies, accessible only to members of one organisation behind logins and a firewall; used for internal news, policies, forms and documents.", "why": "Internet technology, private audience.", "prerequisites": ["0417-4-A25"], "tier": "core", "paragraphs": "P13"}, {"id": "0417-4-A27", "type": "fact", "statement": "An extranet extends an organisation's intranet to authorised outsiders such as customers and suppliers, over the internet with a username and password.", "why": "Controlled access for partners.", "prerequisites": ["0417-4-A26"], "tier": "core", "paragraphs": "P13"}, {"id": "0417-4-A28", "type": "comparison", "statement": "Internet, intranet and extranet all use internet technologies and can hold web pages; the intranet and extranet both restrict access and sit behind security.", "why": "They are one technology with different audiences.", "prerequisites": ["0417-4-A25", "0417-4-A26", "0417-4-A27"], "tier": "core", "paragraphs": "P14"}, {"id": "0417-4-A29", "type": "comparison", "statement": "They differ in who may access (anyone / members / members plus authorised outsiders), ownership (nobody / an organisation), amount of information, and trust and security (an extranet adds outside logins).", "why": "Audience decides security.", "prerequisites": ["0417-4-A25", "0417-4-A26", "0417-4-A27"], "tier": "core", "paragraphs": "P14"}, {"id": "0417-4-A30", "type": "fact", "statement": "Cloud computing stores data and runs software on remote servers in data centres run by a third-party provider and reached through the internet; uses include storage, backup, sharing, online applications and cloud gaming.", "why": "Computing as a rented service.", "prerequisites": ["0417-4-A25"], "tier": "core", "paragraphs": "P15"}, {"id": "0417-4-A31", "type": "fact", "statement": "Cloud characteristics: rented by subscription or pay-per-use, capacity expands or shrinks on demand, accessible from any connected device anywhere, copies held on several servers.", "why": "Shared infrastructure scales.", "prerequisites": ["0417-4-A30"], "tier": "core", "paragraphs": "P15"}, {"id": "0417-4-A32", "type": "fact", "statement": "A public cloud is shared by many customers of a provider; a private cloud is used and completely controlled by one organisation, with access restricted to its members.", "why": "Control and access, not number of users.", "prerequisites": ["0417-4-A30"], "tier": "core", "paragraphs": "P15"}, {"id": "0417-4-A33", "type": "procedure", "statement": "How cloud data is stored: the user uploads it, it is saved on remote servers, and it is backed up to other servers.", "why": "Redundancy protects against server failure.", "prerequisites": ["0417-4-A31"], "tier": "core", "paragraphs": "P16"}, {"id": "0417-4-A34", "type": "fact", "statement": "How cloud data is managed: the provider maintains hardware, security and backups; the owner or administrator controls access; files are synced; changes are tracked and versions kept; billing follows usage.", "why": "Someone else runs the servers; the user runs permissions.", "prerequisites": ["0417-4-A31"], "tier": "core", "paragraphs": "P16"}, {"id": "0417-4-A35", "type": "procedure", "statement": "Sharing or transferring via the cloud: upload the file, grant access, each user logs into their cloud account, opens and edits, changes save and sync, a history is kept; at the far end log in and download.", "why": "The cloud copy is the single shared version.", "prerequisites": ["0417-4-A33"], "tier": "core", "paragraphs": "P16"}, {"id": "0417-4-A36", "type": "relationship", "statement": "Advantages of cloud over local or portable storage: access anywhere on many devices, easy sharing, nothing physical to lose or damage, automatic backup, expandable and pay for what you use.", "why": "The data lives on managed, networked servers.", "prerequisites": ["0417-4-A31"], "tier": "core", "paragraphs": "P17"}, {"id": "0417-4-A37", "type": "relationship", "statement": "Disadvantages and issues of the cloud: needs a stable internet connection, ongoing subscription, loss of control to a third party (possibly under other laws), more copies kept longer increases breach risk, data lost if the provider closes or the subscription lapses.", "why": "Dependence on a connection and on another organisation.", "prerequisites": ["0417-4-A31"], "tier": "core", "paragraphs": "P17"}, {"id": "0417-4-A38", "type": "fact", "statement": "Non-cloud ways to move files: email attachment, pen drive, portable HDD or SSD, rewritable CD or DVD (USB on its own is a port, not a method).", "why": "Physical media or a message carry the file instead.", "prerequisites": ["0417-4-A30"], "tier": "core", "paragraphs": "P17"}, {"id": "0417-4-A39", "type": "fact", "statement": "Privacy means personal data is not seen by those who should not see it; confidentiality means transferred data is read only by its intended recipients; data in transit can be intercepted and passwords captured by spyware, key loggers or shoulder surfing.", "why": "Networks open new routes to data.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P18"}, {"id": "0417-4-A40", "type": "fact", "statement": "A strong password is long (8+ characters), mixes upper- and lower-case letters, digits and symbols, and has no sequence or personal link; guessing programs try personal details, words and sequences first and each extra character multiplies the guesses.", "why": "Strength is the size of the search space.", "prerequisites": ["0417-4-A39"], "tier": "core", "paragraphs": "P19"}, {"id": "0417-4-A41", "type": "fact", "statement": "A weak password is short, uses one kind of character, is a word or keyboard sequence, or contains personal details such as a name plus birth year.", "why": "Predictable patterns are guessed first.", "prerequisites": ["0417-4-A40"], "tier": "core", "paragraphs": "P19"}, {"id": "0417-4-A42", "type": "technique", "statement": "Avoid password interception and misuse: up-to-date anti-spyware, change passwords regularly, a different password per account, never share or write them down, beware shoulder surfing.", "why": "Each blocks one route to the password.", "prerequisites": ["0417-4-A39"], "tier": "core", "paragraphs": "P20"}, {"id": "0417-4-A43", "type": "relationship", "statement": "Reusing one password on several accounts means one cracked password opens all of them.", "why": "The secret is no longer limited to one system.", "prerequisites": ["0417-4-A42"], "tier": "core", "paragraphs": "P20"}, {"id": "0417-4-A44", "type": "fact", "statement": "A user ID identifies the account and is unique; the password proves the user owns it and need not be unique; systems mask passwords and lock accounts after repeated failures.", "why": "Identification versus authentication.", "prerequisites": ["0417-4-A40"], "tier": "core", "paragraphs": "P20"}, {"id": "0417-4-A45", "type": "relationship", "statement": "A very strong password is hard to crack but hard to remember, so it may be written down, typed while looking at the keyboard, mistyped, or have characters confused (1/l, 5/S).", "why": "Security and usability pull in opposite directions.", "prerequisites": ["0417-4-A40"], "tier": "core", "paragraphs": "P21"}, {"id": "0417-4-A46", "type": "relationship", "statement": "Forced regular password changes shorten the life of a stolen password but lead to similar passwords (weaker), forgetting and lock-out, and writing passwords down.", "why": "Users adapt to the rule in insecure ways.", "prerequisites": ["0417-4-A42"], "tier": "core", "paragraphs": "P21"}, {"id": "0417-4-A47", "type": "fact", "statement": "Biometric methods authenticate by a unique physical or behavioural feature: fingerprint or thumbprint, face, iris, retina, voice, hand geometry, typing pattern.", "why": "Something you are.", "prerequisites": ["0417-4-A39"], "tier": "core", "paragraphs": "P22"}, {"id": "0417-4-A48", "type": "relationship", "statement": "Benefits of biometrics: unique, cannot be forgotten or lost, very hard (not impossible) to forge, the person must be present, no shoulder surfing.", "why": "The credential is part of the body.", "prerequisites": ["0417-4-A47"], "tier": "core", "paragraphs": "P22"}, {"id": "0417-4-A49", "type": "relationship", "statement": "Drawbacks of biometrics: expensive and slow to set up and enrol; misreads if a finger is wet or cut, a voice changes, the scanner is dirty or it is noisy; privacy concerns; a stolen biometric cannot be changed.", "why": "Bodies and sensors vary.", "prerequisites": ["0417-4-A47"], "tier": "core", "paragraphs": "P22"}, {"id": "0417-4-A50", "type": "fact", "statement": "A magnetic stripe card stores data in a strip read by swiping: cheap and quick but damaged by magnets, wears, easy to clone and usable by whoever holds it, so a PIN is often added.", "why": "Data is stored passively in a readable strip.", "prerequisites": ["0417-4-A39"], "tier": "core", "paragraphs": "P23"}, {"id": "0417-4-A51", "type": "comparison", "statement": "A smart card holds a chip that stores data securely: more data than a magnetic stripe, much harder to clone, can be contactless, usually with a PIN; both are lost-card risks.", "why": "A chip can protect its data; a stripe cannot.", "prerequisites": ["0417-4-A50"], "tier": "core", "paragraphs": "P23"}, {"id": "0417-4-A52", "type": "fact", "statement": "A physical token is a small hardware device that generates a one-time passcode valid for a short time, entered with the password as an extra layer of security.", "why": "A stolen password is useless without the current code.", "prerequisites": ["0417-4-A39"], "tier": "core", "paragraphs": "P24"}, {"id": "0417-4-A53", "type": "fact", "statement": "An electronic token is software (an app, or a code sent by text or email after login) giving a single-use, short-lived code; it does the job of a physical token without hardware.", "why": "Same idea, delivered as software.", "prerequisites": ["0417-4-A52"], "tier": "core", "paragraphs": "P24"}, {"id": "0417-4-A54", "type": "fact", "statement": "Zero login authenticates the user in the background from signals such as device, network, location and biometrics, with no manual input.", "why": "Identity inferred continuously instead of typed.", "prerequisites": ["0417-4-A47"], "tier": "core", "paragraphs": "P24"}, {"id": "0417-4-A55", "type": "relationship", "statement": "Zero login: no password to forget or shoulder-surf and faster login; but it runs constantly using resources, raises privacy concerns, can raise device cost and ties access to the recognised user and device.", "why": "Convenience bought with monitoring.", "prerequisites": ["0417-4-A54"], "tier": "core", "paragraphs": "P24"}, {"id": "0417-4-A56", "type": "fact", "statement": "Authentication factors are something you know, have, are, or where you are; two-factor authentication combines two different types for an extra layer of security.", "why": "Two kinds of evidence are harder to steal together.", "prerequisites": ["0417-4-A40", "0417-4-A47", "0417-4-A52"], "tier": "core", "paragraphs": "P22; P24"}, {"id": "0417-4-A57", "type": "fact", "statement": "Malware is malicious software (viruses, worms, Trojans, spyware, ransomware); anti-virus software targets viruses, anti-malware software covers the wider range.", "why": "Different threats, overlapping tools.", "prerequisites": ["0417-4-A01"], "tier": "core", "paragraphs": "P25"}, {"id": "0417-4-A58", "type": "concept", "statement": "Anti-virus and anti-malware compare files with a database of known signatures, and heuristic checks look for suspicious code or behaviour; the software must be kept up to date because the database changes daily.", "why": "Unknown signatures cannot be matched.", "prerequisites": ["0417-4-A57"], "tier": "core", "paragraphs": "P25"}, {"id": "0417-4-A59", "type": "procedure", "statement": "When malware is found: the software alerts the user and deletes or quarantines the file (moves it to a hidden, isolated area where it cannot run, spread or be opened), then re-scans.", "why": "Isolation stops it acting.", "prerequisites": ["0417-4-A58"], "tier": "core", "paragraphs": "P26"}, {"id": "0417-4-A60", "type": "relationship", "statement": "Quarantine rather than delete when deletion is unsafe, typically infected system files the computer needs, or when the detection may be a false alarm.", "why": "Deleting a needed file could stop the computer working.", "prerequisites": ["0417-4-A59"], "tier": "core", "paragraphs": "P26"}, {"id": "0417-4-A61", "type": "procedure", "statement": "Scan portable storage media before opening or copying from them, and scan downloads and email attachments before opening; if clean, open or download; if infected, delete without opening.", "why": "Incoming data is the main infection route.", "prerequisites": ["0417-4-A58"], "tier": "core", "paragraphs": "P27"}, {"id": "0417-4-A62", "type": "fact", "statement": "Electronic conferencing is real-time communication over a network between people in different places; shared benefits: no travel time or costs, meetings at short notice, safer, anyone anywhere can join.", "why": "The network replaces the journey.", "prerequisites": ["0417-4-A25"], "tier": "core", "paragraphs": "P28"}, {"id": "0417-4-A63", "type": "relationship", "statement": "Shared drawbacks of conferencing: needs a fast stable internet connection, time zones, lag, freezing, lip-sync and echo problems, equipment and training costs, less personal and harder to hold attention.", "why": "Everything depends on the link and the screen.", "prerequisites": ["0417-4-A62"], "tier": "core", "paragraphs": "P28"}, {"id": "0417-4-A64", "type": "fact", "statement": "Video-conferencing hardware: computer, webcam, microphone, speakers or headphones, monitor or large screen, router or internet connection.", "why": "Capture, display and transmit both sound and image.", "prerequisites": ["0417-4-A62"], "tier": "core", "paragraphs": "P29"}, {"id": "0417-4-A65", "type": "fact", "statement": "Video-conferencing software: conferencing software, hardware drivers (make webcam and microphone work), a CODEC (compresses and decompresses the streams), echo-cancellation (stops the microphone picking up the speakers).", "why": "Raw video is too large and feedback ruins audio.", "prerequisites": ["0417-4-A64"], "tier": "core", "paragraphs": "P29"}, {"id": "0417-4-A66", "type": "fact", "statement": "Audio-conferencing is voice only: participants join one call, often by dialling into a central system with a PIN, using a telephone handset or a computer's microphone and speakers with an audio-conferencing app.", "why": "Sound alone needs the least kit.", "prerequisites": ["0417-4-A62"], "tier": "core", "paragraphs": "P30"}, {"id": "0417-4-A67", "type": "comparison", "statement": "Audio versus video-conferencing: audio is simpler, cheaper, needs less bandwidth (less freezing), has no lip-sync issues and gives more privacy, but loses body language and visual aids and makes attention and turn-taking hard to judge.", "why": "Removing the picture removes both its cost and its information.", "prerequisites": ["0417-4-A64", "0417-4-A66"], "tier": "core", "paragraphs": "P30"}, {"id": "0417-4-A68", "type": "fact", "statement": "Web-conferencing (including webinars) runs in a browser or app over the internet: participants see the same screen, presentations and documents, with chat, polls and optional audio and video.", "why": "Shared screen is the point.", "prerequisites": ["0417-4-A62"], "tier": "core", "paragraphs": "P31"}, {"id": "0417-4-A69", "type": "comparison", "statement": "Web- versus video-conferencing: web needs less dedicated hardware and software, works on more devices and has fewer lag problems, but is less personal; versus meeting in person it saves travel and can be recorded but needs suitable devices and connections for all.", "why": "Lighter tools, lighter presence.", "prerequisites": ["0417-4-A68", "0417-4-A64"], "tier": "core", "paragraphs": "P31"}, {"id": "0417-4-A70", "type": "technique", "statement": "Paper 1 conventions: list points, first answers only marked; 6-mark discussions need both sides (max five a side); step questions earn one mark per distinct step; specific wording ('stable internet connection', 'large geographical area', 'MAC address'); generic names, never brands.", "why": "Published mark schemes and examiner reports.", "prerequisites": [], "tier": "core", "paragraphs": "P32"}], "misconceptions": [{"id": "0417-4-M01", "wrong": "a NIC connects a computer to the internet.", "correct": "a NIC connects the device to the local network; the router connects the network to the internet.", "atoms": ["0417-4-A05", "0417-4-A11"]}, {"id": "0417-4-M02", "wrong": "a firewall or anti-spyware removes or prevents viruses.", "correct": "up-to-date anti-virus / anti-malware software scans, detects and removes or quarantines viruses; a firewall controls traffic.", "atoms": ["0417-4-A57", "0417-4-A58"]}, {"id": "0417-4-M03", "wrong": "a switch is the same as a hub, broadcasts to everyone, or turns the network on and off.", "correct": "a switch reads destination MAC addresses and sends data only to that device; a hub broadcasts.", "atoms": ["0417-4-A09", "0417-4-A08"]}, {"id": "0417-4-M04", "wrong": "intranet and internet are the same thing (or the words are interchangeable).", "correct": "an intranet is private to one organisation; the internet is public and owned by nobody.", "atoms": ["0417-4-A26", "0417-4-A29"]}, {"id": "0417-4-M05", "wrong": "a private cloud is a cloud used by one person.", "correct": "a private cloud is controlled by one organisation and restricted to its members.", "atoms": ["0417-4-A32"]}, {"id": "0417-4-M06", "wrong": "the cloud just means 'data stored on the internet', or is only for backing up a phone.", "correct": "the cloud is remote servers run by a third-party provider, reached via the internet, used for storage, sharing and running software.", "atoms": ["0417-4-A30", "0417-4-A33", "0417-4-A34"]}, {"id": "0417-4-M07", "wrong": "biometric data is impossible to forge, so biometrics have no security drawbacks.", "correct": "biometrics are very hard but not impossible to forge, can misread, raise privacy concerns and cannot be changed if stolen.", "atoms": ["0417-4-A48", "0417-4-A49"]}, {"id": "0417-4-M08", "wrong": "a password is unique to the user in the same way a user ID is.", "correct": "the user ID is unique and identifies the account; the password authenticates and need not be unique.", "atoms": ["0417-4-A44"]}, {"id": "0417-4-M09", "wrong": "quarantining a virus means deleting it, and the software can quarantine without first detecting it.", "correct": "the software scans and detects, alerts, then isolates the file in a hidden area (used when deletion is unsafe, e.g. system files).", "atoms": ["0417-4-A59", "0417-4-A60"]}, {"id": "0417-4-M10", "wrong": "an IP address tells you where a user (person) is.", "correct": "an IP address identifies the location of a device on a network.", "atoms": ["0417-4-A04"]}]}
|
data/chapters/0455_ch2_elasticity_and_market_system.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"id": "0455_ch2_elasticity_and_market_system", "subject": "Economics", "code": "0455", "chapter": "PED, PES and the market economic system (students' 2.7 and 2.8)", "text": "Status: model-generated, unreviewed by a subject teacher. Generated 2 Oct 2026.\n\n# 0455 Economics — Chapter \"2.7 and 2.8\": Price elasticity of demand, price elasticity of supply and the market economic system\n\nScope: 2027–29 sections 2.6 (PED), 2.7 (PES), 2.8 (market economic system); numbered 2.7, 2.8, 2.9 in the 2023–25 syllabus the archived papers follow, so \"2.7 and 2.8\" may mean either pair. No Core/Extended split. Paragraphs [P1]… are the atom anchors. Stage 1 text; see `syllabus/igcse/midterm/ATOMS_PLAN.md`.\n\n## A. The question elasticity answers\n\n[P1] The law of demand says that when price rises, the quantity demanded falls; the law of supply says that when price rises, the quantity supplied rises. Both laws give only a *direction*. A firm setting its price, or a government taxing cigarettes, needs the *size* of the response: does a 10% price rise cut sales by 2% or by 30%? Elasticity measures that size. It cannot be measured in raw units, because \"50 fewer units\" means something very different for a bakery and for a car maker, and because prices are in different currencies. So economists compare *percentage* changes, which have no units and can be compared across any two markets. Every elasticity in this chapter is therefore a ratio of two percentage changes, and every percentage change is calculated the same way: (new value − original value) ÷ original value × 100.\n\n## B. Price elasticity of demand (PED)\n\n[P2] **Price elasticity of demand** measures the responsiveness of the quantity demanded of a product to a change in its price. The formula is PED = percentage change in quantity demanded ÷ percentage change in price. Suppose the price of a bus ticket rises from $4 to $5 and daily journeys fall from 1,000 to 900. Price has risen by 25%; quantity demanded has fallen by 10%; PED = −10 ÷ 25 = −0.4. Two points about the answer. First, it is a pure number with no unit and is not a percentage, so \"0.4\" is right and \"40%\" or \"4%\" is wrong. Second, it is negative, because price and quantity demanded move in opposite directions. Cambridge mark schemes accept the value with or without the minus sign (the archive's one Paper 2 PED calculation accepts \"0.3\" or \"−0.3\"), so in this chapter we state a convention once: we write the sign, and we judge whether demand is elastic by the *size* of the number, ignoring the sign. The most common slips are to put price on top (inverting the formula, giving −2.5 instead of −0.4) and to divide absolute changes rather than percentage changes.\n\n[P3] The value of PED is read against the number 1, because 1 is where the two percentage changes are equal. If the size of PED is **greater than 1**, demand is **price-elastic**: quantity responds more than proportionately (a 10% price cut raises quantity demanded by more than 10%). If it is **between 0 and 1**, demand is **price-inelastic**: quantity responds less than proportionately. If it is exactly 1, demand is **unitary**: the two percentage changes are equal. Two limiting cases complete the set. **Perfectly inelastic** demand (PED = 0) means quantity demanded does not change at all when price changes. **Perfectly elastic** demand (PED = infinity) means that buyers will take any quantity at one price but none at all at any higher price. A PED of −2.0 is elastic, not inelastic: the minus sign tells the direction, the 2 tells the size. \"Elastic\" never means \"demand will increase\"; it describes how strongly quantity reacts *if* price changes.\n\n[P4] The categories have pictures. A perfectly inelastic demand curve is vertical: whatever the price, the same quantity is bought. A perfectly elastic demand curve is horizontal at one price. Between these, when two demand curves pass through the same point, the steeper one is the less elastic, because the same price change moves quantity less along it. Unitary elasticity along a whole curve needs a curve on which price × quantity is the same at every point. Note that PED is not slope: along one straight-line demand curve the slope is constant but PED falls as price falls, because the same absolute change is a bigger percentage of a small number. Exam questions use the simpler rule and the two extremes.\n\n[P5] The formula can be run backwards, and Paper 1 does this often. If PED and the percentage change in price are known, then percentage change in quantity demanded = PED × percentage change in price. With petrol at PED −0.25, a tax that raises the price by 12% cuts quantity demanded by 0.25 × 12 = 3%. If PED and a *target* change in quantity are known, percentage change in price = percentage change in quantity ÷ PED: to cut consumption of a product with PED −0.5 by 10%, the price must rise by 10 ÷ 0.5 = 20%. The trap in this inversion is to multiply where you should divide, which gives 5% and is exactly the wrong answer the examiners report choosing. A quick check prevents it: inelastic demand means quantity moves *less* than price, so the price change must be the bigger of the two numbers.\n\n[P6] Why is demand for some goods elastic and for others inelastic? One idea explains every determinant: PED measures how easily buyers can *avoid* a price rise. Where avoiding it is easy, demand is elastic; where it is hard, demand is inelastic. **Substitutes** are the main route of escape: a product with many close substitutes (one brand of chocolate, one airline on a busy route) has elastic demand, while one with none (salt, tap water, a life-saving medicine) has inelastic demand. **Necessities** are hard to give up, so demand is inelastic; **luxuries** can be dropped, so demand is elastic. **Habit-forming or addictive** goods (cigarettes, coffee) are hard to cut back, so demand is inelastic. The **proportion of income** spent on the good matters: a 10% rise in the price of matches goes unnoticed, while a 10% rise in the price of a car is a large sum, so expensive items tend to have more elastic demand. **Time** matters: in the short run buyers are locked into habits and equipment, but given longer they find alternatives, so demand becomes more elastic over time. The **breadth of definition** matters: demand for \"food\" is inelastic, demand for \"one brand of frozen pizza\" is elastic, because a narrow definition has more substitutes. Whether the purchase **can be postponed**, and how strong **brand loyalty** is, work the same way. In an answer, a determinant earns its marks only when its *direction* is stated: \"salt has no close substitutes, *so* demand is inelastic\".\n\n[P7] PED matters most because of what it does to spending. When a firm sells Q units at price P, its **total revenue** is P × Q, and that same sum is the **consumer expenditure** on the product. A price change pulls the two parts of P × Q in opposite directions: price goes one way, quantity the other. Which one wins depends on PED. In the bus example, price rose 25% and quantity fell only 10%, so revenue rose from $4 × 1,000 = $4,000 to $5 × 900 = $4,500. For a product whose price falls from $20 to $18 while sales rise from 300 to 360 (PED −2.0), revenue rises from $6,000 to $6,480 even though price fell. The rule follows: with **inelastic** demand, a price rise raises revenue and a price cut lowers it; with **elastic** demand, a price rise lowers revenue and a price cut raises it; with **unitary** demand, revenue does not change. In the extreme of perfectly inelastic demand (PED = 0), revenue changes in exactly the same proportion as price, which is why, of all possible PED values, 0 gives the largest revenue gain from a price rise. On a diagram, revenue is the rectangle under the demand curve at the chosen price (width Q, height P); comparing the rectangle lost and the rectangle gained shows the same result.\n\n[P8] Three mistakes cluster here. A price rise does not always raise revenue: it does not if enough sales are lost. Revenue is not profit: profit also depends on costs, which PED says nothing about, and mark schemes refuse profit answers to revenue questions. And a price change moves buyers *along* the demand curve (an extension or contraction of quantity demanded); it does not shift demand.\n\n[P9] PED shapes decisions across the economy. **Firms** use it in pricing: with inelastic demand they can raise price and gain revenue; with elastic demand they gain by cutting price; a firm selling in two markets with different PEDs can charge more where demand is inelastic (price discrimination, as with peak-time rail fares), and advertising that builds brand loyalty is an attempt to make demand less elastic. **Consumers** are most exposed to price rises for goods with inelastic demand, such as fuel and staple foods, and low-income households most of all. **Workers** are affected because the demand for labour is derived from demand for the product: when a product's demand is elastic, a cost increase passed on in price loses many sales and therefore jobs, which weakens workers' bargaining power. **Governments** use PED when choosing what to tax. An indirect tax on a good with inelastic demand raises a lot of revenue, because sales fall little, and producers can pass much of the tax on to consumers; but if the aim is to *reduce* consumption of a harmful good with inelastic demand, the tax changes behaviour only a little. A tariff protects domestic producers most when demand for the imported good is elastic, because then buyers switch away from it strongly.\n\n## C. Price elasticity of supply (PES)\n\n[P10] **Price elasticity of supply** measures the responsiveness of the quantity supplied of a product to a change in its price: PES = percentage change in quantity supplied ÷ percentage change in price. When the price of a vegetable rises from $2.00 to $2.50 per kilo (25%) and farmers increase the quantity supplied from 800 to 900 tonnes (12.5%), PES = 12.5 ÷ 25 = 0.5. Because price and quantity supplied normally move in the *same* direction, PES is positive, and a negative answer is a sign of an arithmetic slip. As with PED, the answer has no unit, the percentage change in price goes on the bottom, and the formula can be run forwards: with PES = 1.5, a rise in price from $50 to $60 (20%) raises the quantity supplied by 30%, from 2,000 to 2,600 units.\n\n[P11] The value is read against 1 in exactly the same way. PES **greater than 1** is **elastic** supply (the percentage change in quantity supplied exceeds the percentage change in price); **between 0 and 1** is **inelastic** supply; **1** is **unitary**; **0** is **perfectly inelastic** (a vertical supply curve: the quantity on offer is fixed, as for seats in a stadium on match day); and **infinity** is **perfectly elastic** (a horizontal supply curve: any quantity is supplied at one price). For straight-line supply curves there is a neat geometric test: a line that starts on the price axis is elastic, a line through the origin has PES = 1 at every point, and a line that starts on the quantity axis is inelastic. This is why a line from the quantity axis shows PES between 0 and 1.\n\n[P12] The determinants of PES follow from one idea, mirroring [P6]: PES measures how easily **producers** can change output when price changes. **Time** is the most important: in the very short run output may be fixed, in the short run at least one factor (such as land or factory space) cannot be increased, and in the long run all factors can change, so supply becomes more elastic as time passes. Crops that take years to grow (coffee, cocoa) and products that take years to build (ships, houses, new mines) have inelastic supply in the short run. **Stocks and storage**: if a product can be stored cheaply and stocks are held, a price rise can be met from the warehouse, so supply is elastic; perishable or costly-to-store goods (fresh fish, coal with high storage costs) have inelastic supply. **Spare capacity**: a firm with idle machines and workers can expand output quickly. **Ease and length of production**: bread can be produced more by tomorrow, a smartphone or aircraft cannot. **Mobility of factors of production** and the ease with which new firms can enter the market also make supply more elastic. As with PED, an answer earns marks only when it states the direction: \"coal is expensive to store, *so* supply is inelastic\".\n\n[P13] PES decides how a change in demand is shared between price and quantity. When demand increases, a market with elastic supply responds mainly with more output and a small price rise; a market with inelastic supply responds mainly with a higher price and little extra output. In the limit, perfectly inelastic supply turns the whole of a demand increase into a price rise. This is why farm and housing prices swing sharply, and why relaxing planning rules cannot make housing supply elastic overnight. It also works in reverse: when demand falls, the more elastic the supply, the bigger the fall in quantity sold.\n\n[P14] PED and PES are built the same way, which is why candidates confuse them, as several examiner reports note. PED concerns **buyers** and is usually negative; PES concerns **sellers** and is usually positive. The determinants of PED are about the buyer's escape routes (substitutes, necessity, share of income, habit); the determinants of PES are about the producer's flexibility (time, stocks, spare capacity, production time). \"Availability of stocks\" is never a determinant of PED, and \"number of substitutes\" is never a determinant of PES. A useful self-test before writing any elasticity answer: \"Whose behaviour am I describing, the buyer's or the producer's?\"\n\n## D. The market economic system\n\n[P15] Every economy faces the economic problem: resources are finite and wants are unlimited, so it must decide **what** to produce, **how** to produce it and **for whom**. An **economic system** is the set of institutions that answers those three questions. There are three broad types: the **market economic system**, where the questions are answered by private individuals and firms through the price mechanism; the **planned** (command) system, where a central authority decides; and the **mixed** system, which combines a private sector using the price mechanism with a public sector run by the government. A **market economic system** is one in which resources are allocated by the forces of demand and supply (the price mechanism), land and capital are privately owned, and government intervention is minimal: there is no state provision of goods, no state ownership of firms and no government setting of prices or wages.\n\n[P16] The price mechanism does three jobs without anyone planning it. Prices **signal**: if consumers switch from meat to vegetables, the price of vegetables rises and the price of meat falls, telling producers where buyers' money is going. Prices give an **incentive**: higher vegetable prices mean higher profits, so the profit motive draws land, labour and capital out of meat and into vegetables. Prices **ration**: when a product is scarce, its price rises until only those willing and able to pay buy it. Through these three jobs, *what* is produced follows consumer spending (**consumer sovereignty**), *how* it is produced is chosen by firms seeking the lowest cost (capital-intensive where capital is cheap, labour-intensive where labour is cheap), and *for whom* is decided by who has the income to buy. Prices do not, however, distribute income equally; that is not one of their functions.\n\n[P17] The advantages of a market system follow from the incentives in [P16]. Resources move quickly towards what consumers want, so the system is **responsive**. Competition between firms pushes them to cut **costs**, keep prices low and avoid waste, so the system tends to be **efficient**. The search for profit rewards new products and methods, so it encourages **innovation** and wide **choice**. People are **free** to choose jobs, start businesses and spend as they wish, and no planning bureaucracy is needed, because prices carry the information.\n\n[P18] The disadvantages follow from what prices ignore. Because output goes to those with purchasing power, a market system can leave large **inequalities** of income and wealth, and with no welfare benefits, the unemployed and the sick may fall into poverty. Goods that people cannot be made to pay for individually, such as street lighting, earn no profit and are not supplied; goods whose benefits consumers underestimate, such as education, are under-consumed; harmful goods are over-consumed. Firms and consumers ignore the costs they impose on others, such as pollution. Competition can give way to **monopoly**, which restricts output and raises prices. Factors of production may be slow to move between uses, so falling industries leave **unemployment**. (Syllabus 2.9 gives these failures their technical names: public goods, merit goods, demerit goods, external costs and benefits, monopoly. Here only the plain idea is needed.)\n\n[P19] A \"discuss\" question on the market system is answered by setting [P17] against [P18] and then judging. Good judgements are conditional: a market system allocates well where competition is strong and the product can be sold to individuals, and badly where one firm dominates, where effects spill onto third parties or where people lack income to turn needs into demand. The speed with which a market corrects itself depends on PES: where supply is inelastic, a rise in demand produces a high price for a long time before output catches up. Government intervention can correct some disadvantages (providing public and merit goods, taxing harmful goods, regulating monopolies, paying benefits), but it brings its own risks: poor information, slow decisions, weaker incentives and corruption. Once the government takes on these roles, the economy is no longer a market system but a mixed one (syllabus 2.10).\n\n## E. How this chapter is examined (bridge)\n\n[P20] Paper 1 tests calculations (PED or PES from percentages, schedules or raw values; the inverted formula), PED-and-revenue logic, curve recognition, determinants, and features of the market system. In Paper 2, the 8-mark Section B \"discuss\" parts are marked by levels (Level 3, 6–8: both sides developed with evaluation; Level 2, 3–5: reasoned but may be one-sided; Level 1, 1–2: points stated), the 6-mark \"discuss\" parts of Question 1 are point-marked (up to 4 per side), and everything else is point-marked. A point earns its second mark only when developed: name the determinant, then say whether it makes demand or supply elastic or inelastic.\n\n## Coverage matrix\n\n| Syllabus id (2027–29) | Old id (2023–25) | Statement (abridged, official) | Paragraphs |\n|---|---|---|---|\n| 2.6.1 | 2.7.1 | Definition of PED | P2 |\n| 2.6.2 | 2.7.2 | Calculation of PED using the formula | P1, P2, P5 |\n| 2.6.2 | 2.7.2 | Interpretation of PED values: perfectly inelastic, inelastic, unitary, elastic, perfectly elastic | P3 |\n| 2.6.2 | 2.7.2 | Drawing and interpretation of demand curve diagrams showing different PED | P4 |\n| 2.6.3 | 2.7.3 | Main influences on whether demand is elastic or inelastic | P6 |\n| 2.6.4 | 2.7.4 | Effect of price changes on consumer spending and firms' revenue, in a diagram and as a calculation | P7, P8 |\n| 2.6.4 | 2.7.4 | Relationship between PED and spending / revenue | P7 |\n| 2.6.5 | 2.7.5 | Implications of PED for consumers, workers, producers/firms and government | P9 |\n| 2.7.1 | 2.8.1 | Definition of PES | P10 |\n| 2.7.2 | 2.8.2 | Calculation of PES using the formula | P10 |\n| 2.7.2 | 2.8.2 | Interpretation of PES values (five categories) | P11 |\n| 2.7.2 | 2.8.2 | Drawing and interpretation of supply curve diagrams showing different PES | P11 |\n| 2.7.3 | 2.8.3 | Main influences on whether supply is elastic or inelastic | P12, P13 |\n| 2.8.1 | 2.9.1 | Definition of the market economic system | P15, P16 |\n| 2.8.2 | 2.9.2 | Advantages of the market economic system | P16, P17 |\n| 2.8.2 | 2.9.2 | Disadvantages of the market economic system | P18, P19 |\n| — bridge | — | Why elasticity uses percentages | P1 |\n| — bridge | — | PED vs PES contrast (examiner-reported confusion) | P14 |\n| — bridge, border 2.4.1 | 2.2 | Three key allocation questions; price mechanism functions | P15, P16 |\n| — bridge, border 2.10 | 2.11 | Government intervention turns a market system into a mixed one | P19 |\n| — bridge | — | Exam conventions: sign, no unit, development marks, levels for (d) | P2, P20 |\n\nGaps: none of 2.6.x, 2.7.x, 2.8.x lacks a paragraph. Scope notes: the old-numbering column follows the rule \"2027 section n = 2023 section n + 1\" for this block (as given in the brief; the 2023–25 syllabus text is not in the repo, so sub-statement numbers in that column are inferred). Market-failure terms in P18 are named only as plain ideas; their definitions belong to 2.9. Not covered on purpose: income and cross elasticity (not in the 0455 syllabus), arc / midpoint elasticity formulas, and tax-incidence diagrams beyond the prose in P9.\n", "atoms": [{"id": "0455-2.6-A01", "type": "concept", "statement": "Elasticity compares percentage changes, so it has no units and can be compared across any two markets.", "why": "Raw units (kg, cars, dollars) differ between markets; percentages do not.", "prerequisites": [], "tier": "all (no core/extended split)", "paragraphs": "P1"}, {"id": "0455-2.6-A02", "type": "procedure", "statement": "Percentage change = (new value - original value) / original value x 100.", "why": "The change is measured relative to where you started.", "prerequisites": ["0455-2.6-A01"], "tier": "all (no core/extended split)", "paragraphs": "P1; P2"}, {"id": "0455-2.6-A03", "type": "fact", "statement": "PED measures the responsiveness of quantity demanded to a change in the product's own price.", "why": "It answers 'by how much', which the law of demand does not.", "prerequisites": ["0455-2.6-A01"], "tier": "all (no core/extended split)", "paragraphs": "P2"}, {"id": "0455-2.6-A04", "type": "fact", "statement": "PED = % change in quantity demanded / % change in price.", "why": "Quantity is the response, so it goes on top.", "prerequisites": ["0455-2.6-A03"], "tier": "all (no core/extended split)", "paragraphs": "P2"}, {"id": "0455-2.6-A05", "type": "procedure", "statement": "Calculate PED from two price-quantity pairs, a schedule or given percentages, then classify the result.", "why": "Each interval of a schedule has its own PED.", "prerequisites": ["0455-2.6-A02", "0455-2.6-A04"], "tier": "all (no core/extended split)", "paragraphs": "P2; P3"}, {"id": "0455-2.6-A06", "type": "fact", "statement": "PED is normally negative and is a pure number, not a percentage; Cambridge accepts it with or without the minus sign and it is classified by its size.", "why": "Price and quantity demanded move in opposite directions; a ratio of two percentages cancels the %.", "prerequisites": ["0455-2.6-A04"], "tier": "all (no core/extended split)", "paragraphs": "P2; P3"}, {"id": "0455-2.6-A07", "type": "fact", "statement": "Size of PED above 1 is elastic, between 0 and 1 inelastic, exactly 1 unitary.", "why": "1 is where the two percentage changes are equal.", "prerequisites": ["0455-2.6-A06"], "tier": "all (no core/extended split)", "paragraphs": "P3"}, {"id": "0455-2.6-A08", "type": "fact", "statement": "Perfectly inelastic demand has PED = 0 (quantity does not change); perfectly elastic demand has PED = infinity (any quantity at one price, none above it).", "why": "The limits of the scale.", "prerequisites": ["0455-2.6-A07"], "tier": "all (no core/extended split)", "paragraphs": "P3"}, {"id": "0455-2.6-A09", "type": "representation", "statement": "Perfectly inelastic demand is a vertical curve, perfectly elastic a horizontal one; of two curves through the same point, the steeper is less elastic.", "why": "A steeper curve moves quantity less for the same price change.", "prerequisites": ["0455-2.6-A08"], "tier": "all (no core/extended split)", "paragraphs": "P4"}, {"id": "0455-2.6-A10", "type": "concept", "statement": "PED is not slope: along one straight-line demand curve PED falls as price falls.", "why": "The same absolute change is a bigger percentage of a smaller number.", "prerequisites": ["0455-2.6-A09", "0455-2.6-A02"], "tier": "all (no core/extended split)", "paragraphs": "P4"}, {"id": "0455-2.6-A11", "type": "procedure", "statement": "Run PED forwards: % change in quantity demanded = PED x % change in price.", "why": "Rearranging the formula.", "prerequisites": ["0455-2.6-A04"], "tier": "all (no core/extended split)", "paragraphs": "P5"}, {"id": "0455-2.6-A12", "type": "procedure", "statement": "Run PED backwards: % change in price needed = target % change in quantity / PED.", "why": "Rearranging the formula the other way.", "prerequisites": ["0455-2.6-A04"], "tier": "all (no core/extended split)", "paragraphs": "P5"}, {"id": "0455-2.6-A13", "type": "procedure", "statement": "Turn a percentage change into a new quantity: new quantity = original x (1 + % change / 100).", "why": "Percentages are of the original value.", "prerequisites": ["0455-2.6-A02", "0455-2.6-A11"], "tier": "all (no core/extended split)", "paragraphs": "P5; P10"}, {"id": "0455-2.6-A14", "type": "concept", "statement": "Every PED determinant is about how easily buyers can avoid a price rise: easy escape means elastic, hard escape means inelastic.", "why": "PED is a measure of buyers' flexibility.", "prerequisites": ["0455-2.6-A07"], "tier": "all (no core/extended split)", "paragraphs": "P6"}, {"id": "0455-2.6-A15", "type": "relationship", "statement": "More and closer substitutes make demand more price-elastic.", "why": "Buyers switch when the price rises.", "prerequisites": ["0455-2.6-A14"], "tier": "all (no core/extended split)", "paragraphs": "P6"}, {"id": "0455-2.6-A16", "type": "relationship", "statement": "Necessities have inelastic demand; luxuries have elastic demand.", "why": "A necessity cannot be dropped; a luxury can.", "prerequisites": ["0455-2.6-A14"], "tier": "all (no core/extended split)", "paragraphs": "P6"}, {"id": "0455-2.6-A17", "type": "relationship", "statement": "The larger the share of income spent on a product, the more elastic its demand.", "why": "A price change on an expensive item is a large sum; on a cheap one it goes unnoticed.", "prerequisites": ["0455-2.6-A14"], "tier": "all (no core/extended split)", "paragraphs": "P6"}, {"id": "0455-2.6-A18", "type": "relationship", "statement": "Habit-forming or addictive products have inelastic demand.", "why": "Consumption is hard to cut back.", "prerequisites": ["0455-2.6-A14"], "tier": "all (no core/extended split)", "paragraphs": "P6"}, {"id": "0455-2.6-A19", "type": "relationship", "statement": "Demand becomes more elastic the longer the time period after a price change.", "why": "Buyers need time to find alternatives and change habits.", "prerequisites": ["0455-2.6-A14"], "tier": "all (no core/extended split)", "paragraphs": "P6"}, {"id": "0455-2.6-A20", "type": "relationship", "statement": "A narrowly defined product (one brand) has more elastic demand than the broad product class; strong brand loyalty or a purchase that cannot be postponed makes demand less elastic.", "why": "Narrow definitions have more substitutes; loyalty and urgency remove escape routes.", "prerequisites": ["0455-2.6-A15"], "tier": "all (no core/extended split)", "paragraphs": "P6"}, {"id": "0455-2.6-A21", "type": "fact", "statement": "Total revenue = price x quantity sold, and it equals consumer expenditure on the product.", "why": "The money one side spends is the money the other side receives.", "prerequisites": [], "tier": "all (no core/extended split)", "paragraphs": "P7"}, {"id": "0455-2.6-A22", "type": "relationship", "statement": "With inelastic demand, a price rise raises total revenue and a price cut lowers it.", "why": "Quantity changes by a smaller percentage than price.", "prerequisites": ["0455-2.6-A07", "0455-2.6-A21"], "tier": "all (no core/extended split)", "paragraphs": "P7"}, {"id": "0455-2.6-A23", "type": "relationship", "statement": "With elastic demand, a price rise lowers total revenue and a price cut raises it.", "why": "Quantity changes by a larger percentage than price.", "prerequisites": ["0455-2.6-A07", "0455-2.6-A21"], "tier": "all (no core/extended split)", "paragraphs": "P7"}, {"id": "0455-2.6-A24", "type": "relationship", "statement": "With unitary demand revenue is unchanged by a price change; with PED = 0 revenue changes in the same proportion as price.", "why": "Equal percentage changes cancel; zero response leaves quantity fixed.", "prerequisites": ["0455-2.6-A08", "0455-2.6-A21"], "tier": "all (no core/extended split)", "paragraphs": "P7"}, {"id": "0455-2.6-A25", "type": "procedure", "statement": "Calculate total revenue before and after a price change and state the change.", "why": "Revenue is P x Q at each point.", "prerequisites": ["0455-2.6-A21"], "tier": "all (no core/extended split)", "paragraphs": "P7"}, {"id": "0455-2.6-A26", "type": "representation", "statement": "On a demand diagram revenue is the rectangle P x Q; a price change swaps one rectangle for another, and the larger one shows the revenue direction.", "why": "Area = height x width.", "prerequisites": ["0455-2.6-A21", "0455-2.6-A09"], "tier": "all (no core/extended split)", "paragraphs": "P7"}, {"id": "0455-2.6-A27", "type": "relationship", "statement": "Firms raise price when demand is inelastic and cut it when demand is elastic; they charge more in the market where demand is less elastic, and advertise to build brand loyalty that makes demand less elastic.", "why": "Each choice raises revenue given the PED.", "prerequisites": ["0455-2.6-A22", "0455-2.6-A23"], "tier": "all (no core/extended split)", "paragraphs": "P9"}, {"id": "0455-2.6-A28", "type": "relationship", "statement": "Consumers are hit hardest by price rises on inelastic necessities; workers' jobs are most at risk when demand for their product is elastic, because demand for labour is derived.", "why": "Inelastic: spending rises; elastic: sales and jobs fall.", "prerequisites": ["0455-2.6-A22", "0455-2.6-A23"], "tier": "all (no core/extended split)", "paragraphs": "P9"}, {"id": "0455-2.6-A29", "type": "relationship", "statement": "An indirect tax on a product with inelastic demand raises much revenue and is largely passed on to consumers.", "why": "Sales fall little when price rises.", "prerequisites": ["0455-2.6-A22"], "tier": "all (no core/extended split)", "paragraphs": "P9"}, {"id": "0455-2.6-A30", "type": "relationship", "statement": "A tax on a harmful product with inelastic demand cuts consumption only a little; a tariff protects domestic producers most when demand for the import is elastic.", "why": "The size of the quantity response decides the policy's effect.", "prerequisites": ["0455-2.6-A22", "0455-2.6-A23", "0455-2.6-A18"], "tier": "all (no core/extended split)", "paragraphs": "P9"}, {"id": "0455-2.6-A31", "type": "procedure", "statement": "To discuss whether demand for a product is price-elastic: define PED, argue the elastic side with determinants, the inelastic side with others, then judge with a condition.", "why": "Levels marking rewards both sides developed plus evaluation.", "prerequisites": ["0455-2.6-A15", "0455-2.6-A16", "0455-2.6-A17", "0455-2.6-A18"], "tier": "all (no core/extended split)", "paragraphs": "P6; P20"}, {"id": "0455-2.7-A01", "type": "fact", "statement": "PES measures the responsiveness of quantity supplied to a change in the product's price.", "why": "Producers' version of the elasticity idea.", "prerequisites": ["0455-2.6-A01"], "tier": "all (no core/extended split)", "paragraphs": "P10"}, {"id": "0455-2.7-A02", "type": "fact", "statement": "PES = % change in quantity supplied / % change in price; it is normally positive, so a negative answer signals a slip.", "why": "Price and quantity supplied move in the same direction.", "prerequisites": ["0455-2.7-A01"], "tier": "all (no core/extended split)", "paragraphs": "P10"}, {"id": "0455-2.7-A03", "type": "procedure", "statement": "Calculate PES from two price-quantity pairs, a supply schedule or given percentages.", "why": "Same arithmetic as PED with quantity supplied.", "prerequisites": ["0455-2.7-A02", "0455-2.6-A02"], "tier": "all (no core/extended split)", "paragraphs": "P10"}, {"id": "0455-2.7-A04", "type": "fact", "statement": "PES above 1 is elastic, between 0 and 1 inelastic, 1 unitary, 0 perfectly inelastic, infinity perfectly elastic.", "why": "1 is where the two percentage changes are equal.", "prerequisites": ["0455-2.7-A02"], "tier": "all (no core/extended split)", "paragraphs": "P11"}, {"id": "0455-2.7-A05", "type": "representation", "statement": "A vertical supply curve is perfectly inelastic; a horizontal one is perfectly elastic.", "why": "Vertical: quantity never changes; horizontal: any quantity at one price.", "prerequisites": ["0455-2.7-A04"], "tier": "all (no core/extended split)", "paragraphs": "P11"}, {"id": "0455-2.7-A06", "type": "representation", "statement": "A straight supply line starting on the price axis is elastic, through the origin unitary, starting on the quantity axis inelastic.", "why": "Geometry of percentage changes along a straight line.", "prerequisites": ["0455-2.7-A05"], "tier": "all (no core/extended split)", "paragraphs": "P11"}, {"id": "0455-2.7-A07", "type": "procedure", "statement": "Run PES forwards: % change in quantity supplied = PES x % change in price, then apply it to the original quantity.", "why": "Rearranging the formula.", "prerequisites": ["0455-2.7-A02", "0455-2.6-A13"], "tier": "all (no core/extended split)", "paragraphs": "P10"}, {"id": "0455-2.7-A08", "type": "concept", "statement": "Every PES determinant is about how easily producers can change output when price changes.", "why": "PES is a measure of producers' flexibility.", "prerequisites": ["0455-2.7-A04"], "tier": "all (no core/extended split)", "paragraphs": "P12"}, {"id": "0455-2.7-A09", "type": "relationship", "statement": "Supply becomes more elastic the longer the time period: momentary, short run with a fixed factor, long run with all factors variable.", "why": "More factors can be adjusted given time.", "prerequisites": ["0455-2.7-A08"], "tier": "all (no core/extended split)", "paragraphs": "P12"}, {"id": "0455-2.7-A10", "type": "relationship", "statement": "Products that can be stored cheaply, with stocks held, have elastic supply; perishable or costly-to-store products have inelastic supply.", "why": "Stocks can be released when price rises.", "prerequisites": ["0455-2.7-A08"], "tier": "all (no core/extended split)", "paragraphs": "P12"}, {"id": "0455-2.7-A11", "type": "relationship", "statement": "Spare capacity (idle machines and workers) makes supply elastic.", "why": "Output can rise without new investment.", "prerequisites": ["0455-2.7-A08"], "tier": "all (no core/extended split)", "paragraphs": "P12"}, {"id": "0455-2.7-A12", "type": "relationship", "statement": "A short, simple production process makes supply elastic; a long one (crops, ships, houses, mines) makes it inelastic.", "why": "Output cannot respond faster than it can be made.", "prerequisites": ["0455-2.7-A08"], "tier": "all (no core/extended split)", "paragraphs": "P12"}, {"id": "0455-2.7-A13", "type": "relationship", "statement": "Mobile factors of production and easy entry of new firms make supply more elastic.", "why": "Resources can move into the industry.", "prerequisites": ["0455-2.7-A08"], "tier": "all (no core/extended split)", "paragraphs": "P12"}, {"id": "0455-2.7-A14", "type": "relationship", "statement": "When demand shifts, inelastic supply turns most of the change into a price change and elastic supply into a quantity change.", "why": "Supply's flexibility decides which variable adjusts.", "prerequisites": ["0455-2.7-A04"], "tier": "all (no core/extended split)", "paragraphs": "P13"}, {"id": "0455-2.7-A15", "type": "concept", "statement": "PED is about buyers (escape routes, usually negative); PES is about producers (flexibility, positive); stocks never decide PED and substitutes never decide PES.", "why": "Same formula shape, different agents.", "prerequisites": ["0455-2.6-A14", "0455-2.7-A08"], "tier": "all (no core/extended split)", "paragraphs": "P14"}, {"id": "0455-2.7-A16", "type": "fact", "statement": "Elastic supply: the percentage change in quantity supplied is greater than the percentage change in price (inelastic: smaller).", "why": "Full marks need the word percentage.", "prerequisites": ["0455-2.7-A04"], "tier": "all (no core/extended split)", "paragraphs": "P11"}, {"id": "0455-2.8-A01", "type": "fact", "statement": "Every economy must decide what to produce, how to produce it and for whom.", "why": "Finite resources, unlimited wants.", "prerequisites": [], "tier": "all (no core/extended split)", "paragraphs": "P15"}, {"id": "0455-2.8-A02", "type": "fact", "statement": "The three economic systems are market, planned (command) and mixed.", "why": "They differ in who answers the three questions.", "prerequisites": ["0455-2.8-A01"], "tier": "all (no core/extended split)", "paragraphs": "P15"}, {"id": "0455-2.8-A03", "type": "fact", "statement": "A market economic system allocates resources through the price mechanism (demand and supply), with privately owned land and capital and minimal government intervention.", "why": "Decisions are made by households and firms, not the state.", "prerequisites": ["0455-2.8-A02"], "tier": "all (no core/extended split)", "paragraphs": "P15"}, {"id": "0455-2.8-A04", "type": "fact", "statement": "In a pure market system there is no state provision of goods, no state-owned firms and no government-set prices or wages.", "why": "Any of these makes the economy mixed.", "prerequisites": ["0455-2.8-A03"], "tier": "all (no core/extended split)", "paragraphs": "P15"}, {"id": "0455-2.8-A05", "type": "concept", "statement": "Prices signal: a change in demand moves price, telling producers what buyers want.", "why": "Price carries information no planner has to collect.", "prerequisites": ["0455-2.8-A03"], "tier": "all (no core/extended split)", "paragraphs": "P16"}, {"id": "0455-2.8-A06", "type": "concept", "statement": "Prices give an incentive: higher prices raise profit and draw resources in (the profit motive).", "why": "Firms follow profit.", "prerequisites": ["0455-2.8-A05"], "tier": "all (no core/extended split)", "paragraphs": "P16"}, {"id": "0455-2.8-A07", "type": "concept", "statement": "Prices ration: a scarce product's price rises until only those willing and able to pay buy it.", "why": "Price balances limited supply with demand.", "prerequisites": ["0455-2.8-A05"], "tier": "all (no core/extended split)", "paragraphs": "P16"}, {"id": "0455-2.8-A08", "type": "relationship", "statement": "What is produced follows consumer spending (consumer sovereignty); how follows the lowest-cost method; for whom follows purchasing power.", "why": "The three price functions answer the three questions.", "prerequisites": ["0455-2.8-A05", "0455-2.8-A06", "0455-2.8-A07", "0455-2.8-A01"], "tier": "all (no core/extended split)", "paragraphs": "P16"}, {"id": "0455-2.8-A09", "type": "fact", "statement": "Distributing income equally is not a function of prices.", "why": "Price rations by ability to pay, not by need.", "prerequisites": ["0455-2.8-A07"], "tier": "all (no core/extended split)", "paragraphs": "P16"}, {"id": "0455-2.8-A10", "type": "relationship", "statement": "Advantage: resources move quickly to what consumers want (responsiveness).", "why": "Signals plus incentives.", "prerequisites": ["0455-2.8-A08"], "tier": "all (no core/extended split)", "paragraphs": "P17"}, {"id": "0455-2.8-A11", "type": "relationship", "statement": "Advantage: competition pushes firms to cut costs and waste, keeping prices low (efficiency).", "why": "Inefficient firms lose customers.", "prerequisites": ["0455-2.8-A06"], "tier": "all (no core/extended split)", "paragraphs": "P17"}, {"id": "0455-2.8-A12", "type": "relationship", "statement": "Advantage: the profit motive encourages innovation and wide choice; people are free to choose jobs, firms and spending, with no planning bureaucracy.", "why": "Rewards go to new ideas; prices carry the information.", "prerequisites": ["0455-2.8-A06"], "tier": "all (no core/extended split)", "paragraphs": "P17"}, {"id": "0455-2.8-A13", "type": "relationship", "statement": "Disadvantage: output goes to those with purchasing power, so inequality and poverty can be high, with no welfare safety net.", "why": "For whom = who can pay.", "prerequisites": ["0455-2.8-A08"], "tier": "all (no core/extended split)", "paragraphs": "P18"}, {"id": "0455-2.8-A14", "type": "relationship", "statement": "Disadvantage: goods people cannot be charged for individually are not provided, goods with underestimated benefits are under-consumed and harmful goods are over-consumed.", "why": "No profit, or private benefit does not reflect true benefit. [boundary 2.9: public, merit, demerit goods]", "prerequisites": ["0455-2.8-A06"], "tier": "all (no core/extended split)", "paragraphs": "P18"}, {"id": "0455-2.8-A15", "type": "relationship", "statement": "Disadvantage: costs imposed on third parties (pollution) are ignored, and competition can give way to monopoly that restricts output and raises prices.", "why": "Firms count only their own costs; a dominant firm faces no rival. [boundary 2.9]", "prerequisites": ["0455-2.8-A11"], "tier": "all (no core/extended split)", "paragraphs": "P18"}, {"id": "0455-2.8-A16", "type": "relationship", "statement": "Disadvantage: factors move slowly between uses, so declining industries leave unemployment.", "why": "Factor immobility.", "prerequisites": ["0455-2.8-A10"], "tier": "all (no core/extended split)", "paragraphs": "P18"}, {"id": "0455-2.8-A17", "type": "procedure", "statement": "To discuss a market system: set advantages against disadvantages, then judge conditionally (good where competition is strong and goods are sold to individuals; poor with monopoly, spillovers or low incomes).", "why": "Level 3 needs both sides developed and a reasoned judgement.", "prerequisites": ["0455-2.8-A10", "0455-2.8-A13", "0455-2.8-A14"], "tier": "all (no core/extended split)", "paragraphs": "P19; P20"}, {"id": "0455-2.8-A18", "type": "relationship", "statement": "Government intervention can correct some disadvantages (provide public and merit goods, tax harmful goods, regulate monopoly, pay benefits) but risks poor information, delay, weaker incentives and corruption; with it, the economy becomes mixed.", "why": "Intervention has its own failures. [border 2.10]", "prerequisites": ["0455-2.8-A17", "0455-2.8-A04"], "tier": "all (no core/extended split)", "paragraphs": "P19"}, {"id": "0455-2.8-A19", "type": "relationship", "statement": "How fast a market corrects a shortage depends on PES: with inelastic supply, high prices persist until output catches up.", "why": "Bridge between 2.7 and 2.8.", "prerequisites": ["0455-2.7-A14", "0455-2.8-A05"], "tier": "all (no core/extended split)", "paragraphs": "P13; P19"}], "misconceptions": [{"id": "0455-2.6-M01", "wrong": "PED (or PES) = % change in price / % change in quantity.", "correct": "Quantity, the response, goes on top.", "atoms": ["0455-2.6-A04", "0455-2.7-A02"]}, {"id": "0455-2.6-M02", "wrong": "A minus sign means demand is inelastic (PED = -2 is 'inelastic').", "correct": "Classify by size; the sign only shows direction.", "atoms": ["0455-2.6-A06", "0455-2.6-A07"]}, {"id": "0455-2.6-M03", "wrong": "Elastic demand means demand will increase (inelastic means it will fall).", "correct": "Elasticity describes the size of the response to a price change, not a shift in demand.", "atoms": ["0455-2.6-A03", "0455-2.6-A07"]}, {"id": "0455-2.6-M04", "wrong": "PED is a percentage (an answer of '16 per cent').", "correct": "PED is a ratio of two percentages, a pure number.", "atoms": ["0455-2.6-A06"]}, {"id": "0455-2.6-M05", "wrong": "A price cut makes 'demand' rise (the curve shifts), or quantity moves the wrong way.", "correct": "A price change moves along the demand curve: quantity demanded extends or contracts.", "atoms": ["0455-2.6-A11", "0455-2.6-A23"]}, {"id": "0455-2.6-M06", "wrong": "A price rise always raises revenue; revenue and profit are the same thing.", "correct": "Revenue rises with price only if demand is inelastic; profit also depends on costs.", "atoms": ["0455-2.6-A22", "0455-2.6-A23"]}, {"id": "0455-2.6-M07", "wrong": "Asked for determinants of PED, explain what PED is; or list PES factors (time to produce, stocks) as PED determinants.", "correct": "Determinants of PED are buyers' escape routes: substitutes, necessity, share of income, habit, time, definition.", "atoms": ["0455-2.6-A14", "0455-2.7-A15"]}, {"id": "0455-2.7-M01", "wrong": "PES depends on demand-side factors (substitutes, necessity, how much consumers want it).", "correct": "PES is about producers' flexibility: time, stocks, spare capacity, production time.", "atoms": ["0455-2.7-A08", "0455-2.7-A15"]}, {"id": "0455-2.7-M02", "wrong": "Naming a determinant is enough (storage, production time) without saying whether it makes supply elastic or inelastic.", "correct": "Each influence earns its second mark only with its direction.", "atoms": ["0455-2.7-A10", "0455-2.7-A12"]}, {"id": "0455-2.7-M03", "wrong": "PES is about what shifts the supply curve (costs, taxes, weather).", "correct": "PES is about movement along a supply curve in response to price.", "atoms": ["0455-2.7-A01", "0455-2.7-A08"]}, {"id": "0455-2.7-M04", "wrong": "Inelastic supply means 'a change in price causes a small change in supply'.", "correct": "Definitions must compare percentage changes.", "atoms": ["0455-2.7-A16"]}, {"id": "0455-2.8-M01", "wrong": "A market economy includes government intervention (taxes, public goods, state firms).", "correct": "Those features make an economy mixed; a market system has minimal intervention.", "atoms": ["0455-2.8-A03", "0455-2.8-A04"]}, {"id": "0455-2.8-M02", "wrong": "'Market economic system' means the same as a competitive market, or market failure means market disequilibrium.", "correct": "The market system is an economy-wide way of allocating resources; competition and equilibrium are features of single markets.", "atoms": ["0455-2.8-A03"]}, {"id": "0455-2.8-M03", "wrong": "In a market economy prices distribute income fairly / everyone pays according to need.", "correct": "Prices ration by ability to pay; equal distribution is not one of their functions.", "atoms": ["0455-2.8-A09", "0455-2.8-A13"]}]}
|
data/chapters/0610_ch05.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"id": "0610_ch05", "subject": "Biology", "code": "0610", "chapter": "Enzymes (with enzyme practical skills)", "text": "Status: model-generated, unreviewed by a subject teacher. Generated 2 Oct 2026.\n\n# 0610 Biology — Chapter 5: Enzymes (syllabus 5.1) and the experimental skills used to investigate them\n\nScope: syllabus section 5.1 (Core statements 1–5; Supplement statements 6–9), plus the experimental skills listed under \"Practical assessment\" in the 0610 syllabus as they apply to experiments on enzyme-catalysed reactions (the syllabus names \"rates of enzyme-catalysed reactions, including judging end-points, e.g. colour changes\" as a required practical context). The syllabus does not number the practical skills; this text uses the ids PS1.1–PS5.3 defined in the coverage matrix at the end. Students sit Extended, so Supplement content is in scope. Numbered paragraphs [P1]… are the anchors the knowledge atoms point to. Stage-1 pipeline text; see ATOMS_PLAN.md.\n\n## A. The problem enzymes solve\n\n[P1] A cell is a bag of chemical reactions: building proteins, breaking down glucose, copying DNA. Most of these reactions are possible but extremely slow at body temperature. One way to speed a reaction is to heat it, but a cell cannot be heated far without damaging it. The other way is a **catalyst**: a substance that increases the rate of a chemical reaction and is not changed by the reaction. Because it is not used up, one catalyst particle can be used again and again, so a small amount is enough.\n\n[P2] **Enzymes** are proteins that act as biological catalysts, and they are involved in all metabolic reactions. They matter because life depends on rate, not just on possibility. Respiration has to release energy as fast as a muscle uses it; digestion has to break food down while it is still in the gut; a cell dividing has to copy its DNA in hours, not years. Without enzymes these reactions would run too slowly to sustain life. Each enzyme also gives the cell control: a reaction happens fast only where and when the right enzyme is present.\n\n## B. How an enzyme works: shape\n\n[P3] An enzyme is a protein, so it is a long chain of amino acids folded into a precise three-dimensional shape (proteins contain the elements carbon, hydrogen, oxygen and nitrogen, and give a purple result in the biuret test). The folding is held by many weak bonds between parts of the chain. One small region of the surface is a pocket or groove called the **active site**. The molecule the enzyme acts on is its **substrate**; what comes out is the **product** or products.\n\n[P4] The shape of the active site is **complementary** to the shape of the substrate: the two fit together the way a hand fits a glove, not the way two identical objects match. \"Complementary\" is the word examiners want; saying the active site is \"the same shape as\" the substrate is wrong, because two identical shapes do not fit into each other.\n\n[P5] Enzyme action happens in three steps. (1) Enzyme and substrate molecules move randomly and collide. If the substrate collides with the active site in the right orientation it binds, forming an **enzyme-substrate complex**. (2) While bound, the substrate is held in a way that makes its bonds easier to break or form, so the reaction happens. (3) The **products** have a different shape, no longer fit, and leave the active site. The enzyme is unchanged and its active site is free for the next substrate molecule. A useful picture: the number of enzyme-substrate complexes formed per second is the rate of reaction.\n\n[P6] **Specificity** follows directly from shape. Only a molecule whose shape is complementary to the active site can bind and form a complex, so each enzyme catalyses one reaction (or one type of reaction). Amylase breaks down starch to maltose; maltase breaks maltose to glucose; proteases such as pepsin and trypsin break proteins to amino acids; lipase breaks fats and oils to fatty acids and glycerol. Lipase cannot digest protein because protein molecules do not fit its active site, so no complex can form. A molecule with a shape similar to the substrate can sometimes occupy the active site without reacting; while it is there, real substrate cannot bind, so the rate falls. Anything that changes the shape of the active site changes everything that follows; that is the idea behind the next two sections.\n\n## C. Temperature\n\n[P7] Below the optimum, raising the temperature gives enzyme and substrate molecules more **kinetic energy**. They move faster and collide more often, so there are more **effective collisions** (collisions that lead to binding) per second, more enzyme-substrate complexes form, and the rate rises. At low temperatures, such as 0–5 °C, activity is very low because molecules have little kinetic energy, but the enzyme is **not** denatured: warm it up and activity returns.\n\n[P8] The **optimum temperature** is the temperature at which the rate is greatest. For most human enzymes it is close to 37 °C; enzymes from organisms living in hot springs have much higher optima. The optimum exists because two effects work against each other: more kinetic energy means more collisions, but more vibration also strains the bonds that hold the protein in shape.\n\n[P9] Above the optimum, the vibrations break the weak bonds that hold the enzyme's folded shape. The shape of the active site changes, so it is no longer complementary to the substrate. Substrate can no longer fit or bind, fewer (eventually no) enzyme-substrate complexes form, and the rate falls. This change in shape is **denaturation**. It is permanent: cooling a denatured enzyme does not restore its activity. Denaturation is a change in a molecule; enzymes are not alive, so they are not \"killed\".\n\n[P10] These ideas fix the **shape of the rate–temperature graph**: a gradual rise to a peak at the optimum, followed by a much steeper fall to zero. The curve is not symmetrical, because denaturation sets in quickly once the bonds start breaking. The point where the line meets the temperature axis is where all of the enzyme has been denatured; the peak is the optimum, not the point of denaturation. Note that a gradual fall just after the peak shows that activity is decreasing, not that all of the enzyme is already denatured.\n\n## D. pH\n\n[P11] pH changes enzyme activity through shape, not through kinetic energy. The concentration of hydrogen ions affects the charges on parts of the amino-acid chain and so the bonds that hold the folded shape. Each enzyme has an **optimum pH** at which the active site has the shape that best fits its substrate, so the most enzyme-substrate complexes form. Moving away from the optimum in either direction changes the shape of the active site; the fit becomes poorer, fewer complexes form, and the rate falls. At extremes of pH the enzyme is denatured. Explaining a pH effect with \"more kinetic energy\" or \"more collisions because it is hotter\" is a common and costly error: in a pH experiment the temperature is held constant.\n\n[P12] Optimum pH matches where the enzyme works. Pepsin works in the stomach, where hydrochloric acid makes the contents acidic, and has an optimum near pH 2. Amylase in saliva and the small intestine, and trypsin and lipase in the small intestine, work best near neutral to slightly alkaline pH. Bile, which is alkaline, neutralises the acidic mixture arriving from the stomach so that the pH in the duodenum suits these enzymes. This is why amylase swallowed with food stops working in the stomach: the acid denatures it.\n\n## E. Other factors met in practicals\n\n[P13] Two further factors appear in practical questions although they are not separate syllabus statements. **Enzyme concentration**: more enzyme means more active sites, so more complexes form per second and the rate rises. **Substrate concentration**: more substrate raises the rate while active sites are spare, but once every active site is busy, adding more substrate cannot raise the rate, so a graph levels off (a plateau). A plateau in any enzyme graph means something other than the variable on the x-axis has become limiting. A practical consequence: if the rate is plotted against concentration and the line flattens, the best concentration lies at the start of the plateau, and finding it precisely needs smaller intervals of the independent variable around that point.\n\n## F. Measuring the rate of an enzyme-catalysed reaction\n\n[P14] A rate is a change per unit time, so every enzyme experiment measures either how fast a substrate disappears or how fast a product appears. The standard school systems are: **starch + amylase**, followed by sampling into iodine solution on a spotting tile at regular intervals (blue-black while starch remains, yellow-brown when it has gone), or by testing for the reducing sugar product with Benedict's solution (heat; blue → green → yellow → orange → brick-red as the sugar concentration rises); **hydrogen peroxide + catalase** (from potato, liver, apple), measured as the volume of oxygen collected in a gas syringe or an upturned measuring cylinder over water, or more crudely as the height of the foam; **fat + lipase**, where the fatty acids produced lower the pH, followed with an indicator or pH meter; **protein + protease**, where cloudy egg albumen clears, or a cleared area appears in protein jelly; **pectinase + fruit**, where the volume of juice filtered off rises; **sucrose + invertase**, where Benedict's solution detects the reducing sugars formed.\n\n[P15] Many of these give a time to an **end-point** rather than a rate directly. Rate is then calculated as 1 ÷ time (units s⁻¹ or /s). An end-point judged by colour is subjective, and if samples are taken every 30 seconds the true end-point can lie anywhere within that interval; shorter intervals, a colour standard or a colorimeter reduce this error. Results that never reach the end-point within the time allowed are recorded as greater than the last time tested (for example > 270 s), not as zero. Foam height is a poor measure because the foam surface is uneven and bubbles collapse; collecting the gas and reading its volume is more accurate.\n\n## G. Designing a fair enzyme investigation\n\n[P16] **Variables.** The **independent variable** is the one the experimenter changes (temperature, pH, enzyme concentration, type of tissue); the **dependent variable** is the one measured (time to end-point, volume of oxygen, height of foam, colour). Everything else that could affect the rate must be kept constant, and each must be stated as a measurable quantity: \"the same volume (2 cm³) of amylase solution\", \"the same concentration of hydrogen peroxide\", not \"the same amount of enzyme\" or just \"temperature\". In enzyme work the usual constants are volume and concentration of enzyme, volume and concentration of substrate, temperature (when it is not the independent variable), pH (kept with a buffer solution), time allowed, sampling interval, and size or mass of tissue pieces.\n\n[P17] **Controls.** A **control experiment** is a separate set-up identical to the others except that the factor being tested is absent or inactivated: the same volume of distilled water instead of enzyme, or enzyme that has been boiled to denature it. It shows that the change measured is caused by the enzyme and not by the substrate breaking down on its own or by another ingredient. A control is different from a **controlled variable**: controlled variables are the factors kept constant; a control is a whole extra tube. When volumes differ between tubes, water is added so that every tube has the same total volume, otherwise concentrations differ as well.\n\n[P18] **Temperature control and equilibration.** A thermostatically controlled water-bath holds a set temperature; a beaker of warm water cools during the experiment (insulating it, or checking with a thermometer and adding hot water, is a weaker improvement). Before mixing, the enzyme tube and the substrate tube are placed separately in the water-bath for a few minutes so that both reach the bath temperature. This is **equilibration**: without it the reaction starts at room temperature and the first part of the result belongs to the wrong temperature. The reason is not \"to start the reaction\" — nothing reacts until the two are mixed.\n\n[P19] **Range, interval and repeats.** A useful investigation tests at least five values of the independent variable spread across the range of interest (for example 10, 20, 30, 40, 50, 60 °C); a plan needs at least two and, for an optimum, enough values either side of it. Once a rough optimum is found, a second run with smaller intervals around it locates it more precisely. Each value is tested at least three times in total (two or more repeats). Repeats let anomalous results be identified and excluded and a mean calculated, which makes the results more reliable; they do not make an individual measurement more accurate, and they do not prevent anomalies.\n\n[P20] **Safety.** A hazard is the thing that can cause harm; the precaution must match it. Hydrogen peroxide is an irritant to eyes and skin: wear eye protection and gloves. Enzyme solutions and powders can cause allergic reactions or irritation: avoid skin contact and do not inhale powder. Cutting tissue with a scalpel or knife: cut on a tile, away from the body, and keep fingers clear. Benedict's test uses a hot water-bath: use a test-tube holder and goggles. \"Wear a lab coat\" or \"be careful\" with no named hazard does not earn credit.\n\n## H. Recording and presenting results\n\n[P21] **Tables.** Draw the table with ruled lines and headings. The independent variable goes in the first column; each heading names the quantity and gives its unit after a solidus, for example *temperature / °C*, *time for iodine to stay yellow-brown / s*. Units go in the heading only, never in the body of the table. Readings of the same quantity are given to the same number of decimal places, matching the precision of the instrument (a ruler marked in mm gives whole millimetres). Qualitative results (colours) are recorded as words, with a heading such as *colour with iodine solution*. If a table asks for times derived from a picture of a spotting tile, the time is the entry, not the list of colours.\n\n[P22] **Graphs.** Plot the independent variable on the x-axis and the dependent variable on the y-axis, each labelled with quantity and unit. Choose a linear scale (1, 2 or 5 units per 2 cm square) so that the points use more than half the grid in both directions; the axes need not start at zero. Plot points as small crosses or circled dots, accurate to half a small square. Join points with ruled straight lines between points or draw a single smooth best-fit curve; do not extend the line beyond the data, and do not draw it to the origin unless (0, 0) was measured. To read an intermediate value (interpolation), draw construction lines from the axis to the line and across, and leave them on the graph.\n\n[P23] **Processing.** Common steps are: a mean of repeats (add the trials, divide by the number, excluding anomalies); a rate (1 ÷ time, or volume ÷ time); a percentage change ((new − original) ÷ original × 100); scaling a \"per gram\" value to a given mass; and volume of a cylinder of foam or gas (π r² h, converting mm to cm before or after, remembering 1 cm³ = 1000 mm³). Give the answer to the number of significant figures or decimal places asked for, show working so that method marks can be earned, and give the unit.\n\n## I. Interpreting and evaluating\n\n[P24] **Conclusions** state the relationship between the independent variable and the activity of the enzyme, in the terms of the aim: \"as temperature increased from 10 °C to 40 °C, the activity of amylase increased\", not \"tube W turned yellow-brown first\" (that is a description of the results). A description of a graph needs the trend, the turning point with its value and unit, and any plateau; an **explanation** then adds the reasons (kinetic energy, collisions, complexes, shape, denaturation). Read the command word: \"describe\" asks only for the pattern with data; \"explain\" asks for the reasons.\n\n[P25] **Evaluation.** An **anomalous result** is one that does not fit the pattern of the others; it is identified and left out of the mean or the line. A **source of error** is a feature of the method or apparatus that makes the results less accurate or less comparable: uneven tissue pieces, a water-bath that cools, end-points judged by eye, long sampling intervals, a shared syringe that carries one solution into another (contamination), foam height read against an uneven surface. Each improvement must target the stated error: cut pieces to the same mass and dimensions; use a thermostatically controlled water-bath; use a colorimeter or shorter sampling intervals; use a clean syringe for each solution; collect the gas in a gas syringe. \"Use better equipment\" or \"be more careful\" is not an improvement. Human slips such as misreading a scale are not credited as method errors.\n\n## J. Writing the six-mark plan\n\n[P26] Every Alternative to Practical paper of 2023–25 ends with a six-mark planning question, and a third of them were about enzymes. Mark schemes give a mark for each of: the independent variable with at least two (often three) stated values and how they are produced (water-baths at named temperatures, buffer solutions of named pH, dilutions of the enzyme); the dependent variable and how it is measured, with a time; up to three named, quantified constants; method details (equilibrate both solutions before mixing, sample at stated intervals onto iodine on a spotting tile, collect gas in a gas syringe); at least two repeats; and one hazard-specific safety precaution. A list of variables is not a plan: the method must be described as steps. Expected results are not required.\n\n## K. Bridges to other chapters\n\n[P27] Enzyme ideas are examined inside other topics as often as on their own: digestion (which enzyme, substrate and product; why stomach acid stops amylase; how bile sets the duodenum's pH), photosynthesis and respiration (why the rate rises and then falls with temperature: the reactions are enzyme-controlled), germination (water activates enzymes), fermenters (temperature is controlled because respiration releases heat that would denature the microorganisms' enzymes), and biotechnology (pectinase in fruit juice extraction, lactase for lactose-free milk, enzymes in biological washing powders that work at low temperatures). The protein nature of enzymes links back to biological molecules: the biuret test, and the elements C, H, O, N.\n\n## Coverage matrix\n\nPractical-skill ids (PS…) are this project's numbering of the bulleted list \"Candidates may be required to do the following\" in the 0610 syllabus (Practical assessment section), plus PS0 for the named experimental context. They are not official ids.\n\n| Syllabus id | Statement (abridged, official) | Tier | Paragraphs |\n|---|---|---|---|\n| 5.1.1 | Describe a catalyst as a substance that increases the rate of a chemical reaction and is not changed by the reaction | Core | P1 |\n| 5.1.2 | Describe enzymes as proteins involved in all metabolic reactions, functioning as biological catalysts | Core | P2, P3 |\n| 5.1.3 | Describe why enzymes are important in all living organisms in terms of a reaction rate necessary to sustain life | Core | P2 |\n| 5.1.4 | Describe enzyme action with reference to the shape of the active site being complementary to its substrate and the formation of products | Core | P3, P4, P5 |\n| 5.1.5 | Investigate and describe the effect of changes in temperature and pH on enzyme activity with reference to optimum temperature and denaturation | Core | P7–P12, P14–P19 |\n| 5.1.6 | Explain enzyme action with reference to active site, enzyme-substrate complex, substrate and product | Supplement | P5 |\n| 5.1.7 | Explain the specificity of enzymes in terms of the complementary shape and fit of the active site with the substrate | Supplement | P4, P6 |\n| 5.1.8 | Explain the effect of changes in temperature on enzyme activity in terms of kinetic energy, shape and fit, frequency of effective collisions and denaturation | Supplement | P7, P8, P9, P10 |\n| 5.1.9 | Explain the effect of changes in pH on enzyme activity in terms of shape and fit and denaturation | Supplement | P11, P12 |\n| PS0 | Experimental context: rates of enzyme-catalysed reactions, including judging end-points, e.g. colour changes | — | P14, P15 |\n| PS1.1 | Identify apparatus from diagrams or descriptions | — | P14, P18 |\n| PS1.2 | Draw, complete or label diagrams of apparatus | — | P14 (filtration, gas syringe) |\n| PS1.3 | Use, or explain the use of, common techniques, apparatus and materials | — | P14, P15, P18 |\n| PS1.4 | Select the most appropriate apparatus or method and justify the choice | — | P15, P18, P25 |\n| PS1.5 | Describe food tests | — | P3, P14 |\n| PS1.6 | Describe how the pH of a solution can be tested | — | P14 (indicator, pH meter) |\n| PS1.7 | Describe and explain hazards and safety precautions | — | P20 |\n| PS1.8 | Describe and explain techniques used to ensure the accuracy of observations and data | — | P15, P18, P25 |\n| PS2.1 | Identify the independent and dependent variables | — | P16 |\n| PS2.2 | Describe how and explain why variables should be kept constant | — | P16, P18 |\n| PS2.3 | Suggest an appropriate number and range of values for the independent variable | — | P13, P19 |\n| PS2.4 | Suggest the most appropriate apparatus or technique and justify the choice | — | P14, P18 |\n| PS2.5 | Describe experimental procedures, including a suitable control experiment | — | P17, P26 |\n| PS2.6 | Identify risks and suggest safety precautions | — | P20 |\n| PS2.7 | Describe how to record the results | — | P21 |\n| PS2.8 | Describe how to process the results to form a conclusion or evaluate a prediction | — | P23, P24 |\n| PS2.9 | Make reasoned predictions of expected results | — | P10, P13 |\n| PS3.1 | Take readings from apparatus or diagrams with appropriate precision | — | P15, P21 |\n| PS3.2 | Take sufficient observations, including repeats | — | P19 |\n| PS3.3 | Record qualitative observations from food and other tests | — | P14, P21 |\n| PS3.4 | Record observations systematically in a table with units and precision | — | P21 |\n| PS4.1 | Process data, including for calculations or graph plotting | — | P15, P23 |\n| PS4.2 | Present data graphically | — | P22 |\n| PS4.3 | Analyse and interpret observations and data, including graphs | — | P10, P13, P24 |\n| PS4.4 | Use interpolation and extrapolation graphically; gradient or intercept | — | P22 |\n| PS4.5 | Form conclusions justified by reference to data, with explanation | — | P24 |\n| PS4.6 | Evaluate the quality of data; identify anomalous results and take action | — | P19, P25 |\n| PS5.1 | Evaluate arrangements, methods and techniques, including the use of a control | — | P17, P25 |\n| PS5.2 | Identify sources of error | — | P15, P25 |\n| PS5.3 | Suggest improvements to apparatus, arrangements, methods and techniques | — | P25 |\n| — bridge, no statement | Enzyme and substrate concentration; plateau; inhibitor-like molecules | — | P6, P13 |\n| — bridge, no statement | How to write the six-mark plan (mark-scheme structure) | — | P26 |\n| — bridge, no statement | Enzymes inside digestion, photosynthesis, respiration, germination, fermenters, biotechnology | — | P12, P27 |\n\nGaps: none of 5.1.1–5.1.9 or PS0–PS5.3 lacks a paragraph. Scope notes: PS1.6, PS2.9 and PS4.4 (extrapolation, gradient) are covered only briefly because the 2023–25 enzyme questions did not use them; the drawing of biological specimens and magnification, also AO3 skills, are left out because no archived enzyme question used them (they belong with cells and organisms). Digestive-enzyme names and sites are prerequisites from chapter 7, used here only where a question turns on enzyme action.\n", "atoms": [{"id": "0610-5-A01", "type": "fact", "statement": "A catalyst is a substance that increases the rate of a chemical reaction and is not changed (not used up) by the reaction, so it can be reused.", "why": "Not being consumed is why small amounts work.", "prerequisites": [], "tier": "core", "paragraphs": "P1"}, {"id": "0610-5-A02", "type": "fact", "statement": "Enzymes are proteins that act as biological catalysts in all metabolic reactions.", "why": "Cells make catalysts from the same material as their structure.", "prerequisites": ["0610-5-A01"], "tier": "core", "paragraphs": "P2; P3"}, {"id": "0610-5-A03", "type": "concept", "statement": "Without enzymes, metabolic reactions at body temperature would be far too slow to sustain life; enzymes also let a cell control which reaction happens where.", "why": "Life depends on rate, and heating a cell is not an option.", "prerequisites": ["0610-5-A02"], "tier": "core", "paragraphs": "P2"}, {"id": "0610-5-A04", "type": "fact", "statement": "Enzymes, being proteins, contain carbon, hydrogen, oxygen and nitrogen and give a purple (lilac) result with biuret reagent.", "why": "Protein composition carries over to enzymes.", "prerequisites": ["0610-5-A02"], "tier": "core", "paragraphs": "P3"}, {"id": "0610-5-A05", "type": "fact", "statement": "The active site is the region of the enzyme the substrate binds to; the substrate is the molecule acted on; the products are what is released.", "why": "Names for the three parts of every enzyme story.", "prerequisites": ["0610-5-A02"], "tier": "core", "paragraphs": "P3"}, {"id": "0610-5-A06", "type": "concept", "statement": "The shape of the active site is complementary to (not the same as) the shape of its substrate.", "why": "Complementary shapes fit together; identical shapes do not.", "prerequisites": ["0610-5-A05"], "tier": "core", "paragraphs": "P4"}, {"id": "0610-5-A07", "type": "procedure", "statement": "Enzyme action: substrate collides with and binds to the active site, forming an enzyme-substrate complex; the reaction occurs; the products leave; the enzyme is unchanged and reused.", "why": "Sequence of events that makes catalysis repeatable.", "prerequisites": ["0610-5-A06", "0610-5-A01"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0610-5-A08", "type": "concept", "statement": "The rate of an enzyme reaction is set by how many enzyme-substrate complexes form per second, i.e. by the frequency of effective collisions between enzyme and substrate.", "why": "Every product molecule needs one complex.", "prerequisites": ["0610-5-A07"], "tier": "supplement", "paragraphs": "P5; P7"}, {"id": "0610-5-A09", "type": "concept", "statement": "Specificity: only a substrate whose shape is complementary to the active site can bind and form a complex, so each enzyme catalyses one reaction.", "why": "Shape decides fit, fit decides reaction.", "prerequisites": ["0610-5-A06"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0610-5-A10", "type": "fact", "statement": "Digestive enzymes: amylase starch to maltose; maltase maltose to glucose; proteases (pepsin, trypsin) protein to amino acids; lipase fats to fatty acids and glycerol.", "why": "Recall needed to name substrate and products.", "prerequisites": ["0610-5-A05"], "tier": "core", "paragraphs": "P6"}, {"id": "0610-5-A11", "type": "fact", "statement": "Practical enzymes: catalase breaks hydrogen peroxide to water and oxygen; invertase breaks sucrose to reducing sugars; lactase breaks lactose to glucose and galactose; pectinase breaks down cell walls so more juice is released.", "why": "The substrate-product pair fixes what can be measured.", "prerequisites": ["0610-5-A05"], "tier": "core", "paragraphs": "P14"}, {"id": "0610-5-A12", "type": "relationship", "statement": "A molecule with a shape similar to the substrate can occupy the active site; while it is there substrate cannot bind, so the rate falls.", "why": "Shape-based competition for the same site.", "prerequisites": ["0610-5-A06"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0610-5-A13", "type": "relationship", "statement": "Below the optimum, raising temperature gives molecules more kinetic energy, so effective collisions between enzyme and substrate become more frequent, more complexes form and the rate rises.", "why": "More energy, more collisions.", "prerequisites": ["0610-5-A08"], "tier": "supplement", "paragraphs": "P7"}, {"id": "0610-5-A14", "type": "concept", "statement": "At low temperatures enzyme activity is low but the enzyme is not denatured; activity returns on warming.", "why": "Low kinetic energy does not break bonds.", "prerequisites": ["0610-5-A13"], "tier": "supplement", "paragraphs": "P7"}, {"id": "0610-5-A15", "type": "fact", "statement": "The optimum temperature is the temperature at which the enzyme works fastest; about 37 C for most human enzymes.", "why": "Balance of collision rate and shape stability.", "prerequisites": ["0610-5-A13"], "tier": "core", "paragraphs": "P8"}, {"id": "0610-5-A16", "type": "relationship", "statement": "Above the optimum, vibration breaks bonds holding the enzyme's shape, the active site changes shape, is no longer complementary, fewer complexes form and the rate falls.", "why": "Heat destroys the fit.", "prerequisites": ["0610-5-A06", "0610-5-A15"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0610-5-A17", "type": "fact", "statement": "Denaturation is a permanent change in the shape of the enzyme (its active site); enzymes are molecules, not living, so they are denatured, not killed.", "why": "Bonds broken do not reform on cooling.", "prerequisites": ["0610-5-A16"], "tier": "core", "paragraphs": "P9"}, {"id": "0610-5-A18", "type": "representation", "statement": "The rate-temperature curve rises gradually to a peak at the optimum then falls more steeply to zero; where the line meets the x-axis all the enzyme is denatured.", "why": "Denaturation is faster than the kinetic-energy gain.", "prerequisites": ["0610-5-A16"], "tier": "core", "paragraphs": "P10"}, {"id": "0610-5-A19", "type": "relationship", "statement": "Moving pH away from the optimum changes the shape of the active site, so the fit with the substrate is poorer and fewer complexes form; extremes of pH denature the enzyme.", "why": "pH alters the bonds that hold the folded shape.", "prerequisites": ["0610-5-A06", "0610-5-A17"], "tier": "supplement", "paragraphs": "P11"}, {"id": "0610-5-A20", "type": "concept", "statement": "pH effects are explained by shape and fit, not by kinetic energy; temperature is held constant in a pH experiment.", "why": "Hydrogen ions change charges, not particle speed.", "prerequisites": ["0610-5-A19", "0610-5-A13"], "tier": "supplement", "paragraphs": "P11"}, {"id": "0610-5-A21", "type": "representation", "statement": "A rate-pH graph has a peak at the optimum pH and falls on both sides; different enzymes peak at different pH values.", "why": "Each enzyme suits its own environment.", "prerequisites": ["0610-5-A19"], "tier": "core", "paragraphs": "P11; P12"}, {"id": "0610-5-A22", "type": "fact", "statement": "Optimum pH matches where the enzyme works: pepsin about pH 2 in the stomach; amylase, trypsin and lipase near neutral to slightly alkaline in the mouth and small intestine.", "why": "Adaptation to the local environment.", "prerequisites": ["0610-5-A21", "0610-5-A10"], "tier": "supplement", "paragraphs": "P12"}, {"id": "0610-5-A23", "type": "relationship", "statement": "Stomach hydrochloric acid denatures amylase; alkaline bile neutralises the acidic mixture so the duodenum has a suitable pH for amylase, trypsin and lipase.", "why": "Gut pH is regulated for its enzymes.", "prerequisites": ["0610-5-A22"], "tier": "supplement", "paragraphs": "P12"}, {"id": "0610-5-A24", "type": "relationship", "statement": "More enzyme means more active sites, so more complexes form per second and the rate rises.", "why": "Rate scales with the number of active sites.", "prerequisites": ["0610-5-A08"], "tier": "supplement", "paragraphs": "P13"}, {"id": "0610-5-A25", "type": "relationship", "statement": "When every active site is busy (or another factor limits), the rate stops rising and the graph levels off; a plateau means something else is limiting.", "why": "Saturation.", "prerequisites": ["0610-5-A24"], "tier": "supplement", "paragraphs": "P13"}, {"id": "0610-5-A26", "type": "concept", "statement": "Processes that depend on enzymes (photosynthesis, respiration, germination, fermenters, biological washing powders, juice extraction) show the same temperature and pH behaviour.", "why": "Same mechanism in a different chapter.", "prerequisites": ["0610-5-A16"], "tier": "supplement", "paragraphs": "P27"}, {"id": "0610-PS-A01", "type": "technique", "statement": "An enzyme rate is measured as substrate disappearing or product appearing per unit time; choose the dependent variable that fits the reaction.", "why": "Rate is change per time.", "prerequisites": ["0610-5-A11"], "tier": "core", "paragraphs": "P14"}, {"id": "0610-PS-A02", "type": "technique", "statement": "Starch-amylase: take samples at fixed intervals onto iodine solution on a spotting tile; blue-black means starch remains, yellow-brown means it has gone (the end-point).", "why": "Disappearance of substrate.", "prerequisites": ["0610-PS-A01"], "tier": "core", "paragraphs": "P14"}, {"id": "0610-PS-A03", "type": "technique", "statement": "Benedict's test: add Benedict's solution and heat in a hot water-bath; blue, green, yellow, orange, brick-red show increasing reducing sugar.", "why": "Appearance of product, semi-quantitative.", "prerequisites": ["0610-PS-A01"], "tier": "core", "paragraphs": "P14"}, {"id": "0610-PS-A04", "type": "technique", "statement": "Oxygen from catalase is measured more accurately as a gas volume (gas syringe or upturned measuring cylinder over water) than as foam height or bubble counts.", "why": "Foam is uneven and collapses.", "prerequisites": ["0610-PS-A01"], "tier": "core", "paragraphs": "P14; P15"}, {"id": "0610-PS-A05", "type": "technique", "statement": "Other enzyme measures: lipase lowers pH (follow with indicator or pH meter); protease clears albumen or protein jelly; pectinase juice is filtered and its volume measured.", "why": "Each product has a detectable effect.", "prerequisites": ["0610-PS-A01"], "tier": "core", "paragraphs": "P14"}, {"id": "0610-PS-A06", "type": "procedure", "statement": "Rate = 1 / time to end-point; a tube that never reaches the end-point is recorded as greater than the last time tested (e.g. > 270 s).", "why": "Converts an end-point time to a rate.", "prerequisites": ["0610-PS-A02"], "tier": "core", "paragraphs": "P15"}, {"id": "0610-PS-A07", "type": "concept", "statement": "End-points judged by eye are subjective and the true end-point lies somewhere inside the sampling interval; shorter intervals, a colour standard or a colorimeter improve accuracy.", "why": "Sampling discretises time.", "prerequisites": ["0610-PS-A02"], "tier": "core", "paragraphs": "P15"}, {"id": "0610-PS-A08", "type": "fact", "statement": "The independent variable is changed by the experimenter; the dependent variable is measured.", "why": "Definitions from the syllabus.", "prerequisites": [], "tier": "core", "paragraphs": "P16"}, {"id": "0610-PS-A09", "type": "procedure", "statement": "Controlled variables are stated as measurable quantities: volume and concentration of enzyme and substrate, temperature, pH, time, sampling interval, size or mass of tissue.", "why": "'Amount' or a reagent name alone is not a variable.", "prerequisites": ["0610-PS-A08"], "tier": "core", "paragraphs": "P16"}, {"id": "0610-PS-A10", "type": "technique", "statement": "pH is set and held with buffer solutions.", "why": "Buffers resist pH change.", "prerequisites": ["0610-PS-A09"], "tier": "core", "paragraphs": "P16; P18"}, {"id": "0610-PS-A11", "type": "concept", "statement": "A control experiment is the same set-up with the enzyme absent (same volume of water) or denatured (boiled); it shows that the change is caused by the enzyme.", "why": "Isolates the factor under test.", "prerequisites": ["0610-5-A17"], "tier": "core", "paragraphs": "P17"}, {"id": "0610-PS-A12", "type": "procedure", "statement": "When tubes receive different reagents, add water so that every tube has the same total volume.", "why": "Otherwise concentrations differ too.", "prerequisites": ["0610-PS-A09"], "tier": "core", "paragraphs": "P17"}, {"id": "0610-PS-A13", "type": "technique", "statement": "A thermostatically controlled water-bath holds temperature; a beaker of warm water cools (insulating it is a weaker fix).", "why": "Constant temperature needs active control.", "prerequisites": [], "tier": "core", "paragraphs": "P18"}, {"id": "0610-PS-A14", "type": "technique", "statement": "Equilibration: stand the enzyme and substrate tubes separately in the water-bath before mixing, so the reaction starts at the intended temperature.", "why": "Nothing reacts until mixed.", "prerequisites": ["0610-PS-A13"], "tier": "core", "paragraphs": "P18"}, {"id": "0610-PS-A15", "type": "procedure", "statement": "Choose enough values of the independent variable (at least five for a pattern; at least two or three in a plan) spread on both sides of any expected optimum.", "why": "Range must contain the effect.", "prerequisites": ["0610-PS-A08"], "tier": "core", "paragraphs": "P19"}, {"id": "0610-PS-A16", "type": "procedure", "statement": "To locate an optimum or the start of a plateau, test extra values at smaller intervals around it.", "why": "Wide intervals can miss the true peak.", "prerequisites": ["0610-PS-A15", "0610-5-A25"], "tier": "core", "paragraphs": "P19; P13"}, {"id": "0610-PS-A17", "type": "concept", "statement": "Repeat each value at least three times in total so anomalies can be spotted and a mean calculated; repeats improve reliability, not the accuracy of a single reading.", "why": "Variation is only visible across repeats.", "prerequisites": [], "tier": "core", "paragraphs": "P19"}, {"id": "0610-PS-A18", "type": "technique", "statement": "Safety answers pair a named hazard with a matching precaution: hydrogen peroxide or enzymes, irritant, goggles and gloves; cutting, cut on a tile away from the body; hot water-bath, test-tube holder.", "why": "Precaution must reduce that hazard.", "prerequisites": [], "tier": "core", "paragraphs": "P20"}, {"id": "0610-PS-A19", "type": "representation", "statement": "Results table: ruled, header line, independent variable first, headings 'quantity / unit', no units in the body, readings to a consistent precision that matches the instrument (diagrams measured to the nearest mm).", "why": "Syllabus presentation conventions.", "prerequisites": [], "tier": "core", "paragraphs": "P21"}, {"id": "0610-PS-A20", "type": "representation", "statement": "Record what is asked for: derived times (with '>' where no end-point) rather than lists of colours; qualitative results written as words.", "why": "The table summarises, not copies, the figure.", "prerequisites": ["0610-PS-A19"], "tier": "core", "paragraphs": "P21"}, {"id": "0610-PS-A21", "type": "representation", "statement": "Line graph: independent variable on x, both axes labelled with quantity and unit, linear scale using more than half the grid, points to half a small square, ruled point-to-point or smooth line, no extension to the origin.", "why": "Syllabus graph conventions.", "prerequisites": [], "tier": "core", "paragraphs": "P22"}, {"id": "0610-PS-A22", "type": "procedure", "statement": "To read a value from a graph, draw construction lines from the axis to the line and across, leave them visible, and read from your own line.", "why": "Method marks need the evidence.", "prerequisites": ["0610-PS-A21"], "tier": "core", "paragraphs": "P22"}, {"id": "0610-PS-A23", "type": "procedure", "statement": "Find an initial rate as the gradient of a product-time graph near t = 0, or extrapolate a trend line, with units.", "why": "Gradient = change in y / change in x.", "prerequisites": ["0610-PS-A21"], "tier": "core", "paragraphs": "P22"}, {"id": "0610-PS-A24", "type": "procedure", "statement": "Process data: mean of repeats, percentage change, scaling a per-gram value, volume of a cylinder (pi r^2 h) with mm to cm conversion (1 cm3 = 1000 mm3); give the requested significant figures and show working.", "why": "Method marks are separate from the answer.", "prerequisites": [], "tier": "core", "paragraphs": "P23"}, {"id": "0610-PS-A25", "type": "procedure", "statement": "A conclusion states how the independent variable affected enzyme activity, in the terms of the aim, not a restatement of a reading.", "why": "Conclusions generalise; results describe.", "prerequisites": ["0610-PS-A08"], "tier": "core", "paragraphs": "P24"}, {"id": "0610-PS-A26", "type": "procedure", "statement": "A description of data gives direction, turning point or plateau with values and units; 'describe' does not ask for reasons, 'explain' does.", "why": "Command words set the mark scheme.", "prerequisites": [], "tier": "core", "paragraphs": "P24"}, {"id": "0610-PS-A27", "type": "concept", "statement": "An anomalous result does not fit the pattern; identify it, leave it out of the mean or line, and repeat that reading.", "why": "Keeps one bad reading from distorting the trend.", "prerequisites": ["0610-PS-A17"], "tier": "core", "paragraphs": "P25"}, {"id": "0610-PS-A28", "type": "procedure", "statement": "Name a specific source of error in the method and an improvement that removes it (uneven pieces to equal mass; cooling beaker to thermostatic bath; foam height to gas syringe); human slips are not method errors.", "why": "Improvement must target the stated error.", "prerequisites": [], "tier": "core", "paragraphs": "P25"}, {"id": "0610-PS-A29", "type": "technique", "statement": "Use a clean syringe for each solution so one solution does not contaminate another and change its concentration.", "why": "Carry-over adds solute.", "prerequisites": [], "tier": "core", "paragraphs": "P25"}, {"id": "0610-PS-A30", "type": "procedure", "statement": "Six-mark plan: independent variable with stated values and how they are made; dependent variable and how and when it is measured; named constants; method steps (equilibrate, sample, measure); at least two repeats; one matched safety precaution.", "why": "Mirrors the mark scheme points.", "prerequisites": ["0610-PS-A08", "0610-PS-A09", "0610-PS-A11", "0610-PS-A14", "0610-PS-A15", "0610-PS-A17", "0610-PS-A18"], "tier": "core", "paragraphs": "P26"}, {"id": "0610-PS-A31", "type": "fact", "statement": "Name and draw standard apparatus: thermometer, gas syringe, measuring cylinder, spotting tile, filter funnel with filter paper over a measuring cylinder.", "why": "Apparatus vocabulary and diagrams.", "prerequisites": [], "tier": "core", "paragraphs": "P14; P18"}, {"id": "0610-PS-A32", "type": "procedure", "statement": "Make a reasoned prediction from enzyme theory (e.g. a boiled-enzyme tube shows no change; a 5 C tube reacts slowly but is not denatured).", "why": "Theory drives prediction.", "prerequisites": ["0610-5-A16"], "tier": "core", "paragraphs": "P10; P13"}, {"id": "0610-PS-A33", "type": "concept", "statement": "Explain why a variable must be kept constant: it also changes the rate, so the effect of the independent variable could not be isolated.", "why": "Fair test logic.", "prerequisites": ["0610-PS-A09"], "tier": "core", "paragraphs": "P16"}], "misconceptions": [{"id": "0610-5-M01", "wrong": "the active site is the same shape as the substrate.", "correct": "the active site is complementary in shape to the substrate.", "atoms": ["0610-5-A06"]}, {"id": "0610-5-M02", "wrong": "low temperatures denature or kill enzymes.", "correct": "cold slows enzymes (low kinetic energy); denaturation needs high temperature or extreme pH.", "atoms": ["0610-5-A14", "0610-5-A17"]}, {"id": "0610-5-M03", "wrong": "pH changes enzyme activity through kinetic energy or collision frequency.", "correct": "pH changes the shape of the active site and so the fit.", "atoms": ["0610-5-A20", "0610-5-A19"]}, {"id": "0610-5-M04", "wrong": "the temperature curve is a symmetrical bell, and the enzyme is fully denatured at the peak or on the gradual decline.", "correct": "the fall after the optimum is steeper; complete denaturation is where activity reaches zero.", "atoms": ["0610-5-A18"]}, {"id": "0610-5-M05", "wrong": "'the enzyme changes shape' or 'the active site changes' is a complete explanation of denaturation.", "correct": "state that the shape of the active site changes, so it is no longer complementary and the substrate cannot bind; fewer complexes form.", "atoms": ["0610-5-A16", "0610-5-A19"]}, {"id": "0610-5-M06", "wrong": "activity rises towards the optimum simply because it is nearer the optimum, or because of collisions not specified.", "correct": "more frequent effective collisions between enzyme and substrate, so more enzyme-substrate complexes per second.", "atoms": ["0610-5-A08", "0610-5-A13"]}, {"id": "0610-5-M07", "wrong": "amylase produces glucose; substrates named as enzymes (pectin for pectinase, starch as an enzyme).", "correct": "amylase gives maltose; the '-ase' word is the enzyme, its root is the substrate.", "atoms": ["0610-5-A10", "0610-5-A05"]}, {"id": "0610-5-M08", "wrong": "bile digests fat, or bile and lipase are acidic.", "correct": "bile is alkaline and emulsifies fat; lipase produces fatty acids, which lower the pH.", "atoms": ["0610-5-A23"]}, {"id": "0610-PS-M01", "wrong": "a control is the same as a controlled variable, or the full-strength enzyme tube is the control.", "correct": "a control is a set-up without active enzyme (water or boiled enzyme); controlled variables are the factors kept constant.", "atoms": ["0610-PS-A11"]}, {"id": "0610-PS-M02", "wrong": "repeating makes results more accurate or prevents anomalies.", "correct": "repeats let anomalies be identified and a mean calculated (reliability).", "atoms": ["0610-PS-A17", "0610-PS-A27"]}, {"id": "0610-PS-M03", "wrong": "a conclusion restates a result.", "correct": "a conclusion relates the independent variable to enzyme activity.", "atoms": ["0610-PS-A25"]}, {"id": "0610-PS-M04", "wrong": "units can go in the body of the table, and a table can copy colours when times are asked for.", "correct": "units belong in the headings; record the derived quantity, with '>' where no end-point was reached.", "atoms": ["0610-PS-A19", "0610-PS-A20"]}, {"id": "0610-PS-M05", "wrong": "tubes stand in the water-bath to start the reaction, maintain temperature, or activate the enzyme.", "correct": "to bring each solution separately to the intended temperature before mixing (equilibration).", "atoms": ["0610-PS-A14"]}, {"id": "0610-PS-M06", "wrong": "generic safety (lab coat, 'be careful', gloves against a blade) earns the mark.", "correct": "name the hazard in this method and a precaution that reduces it.", "atoms": ["0610-PS-A18"]}, {"id": "0610-PS-M07", "wrong": "constants may be given as 'amount', a reagent name, or the independent or dependent variable.", "correct": "give a measurable quantity of something not under test (volume / concentration / time / temperature).", "atoms": ["0610-PS-A09"]}, {"id": "0610-PS-M08", "wrong": "a plan is a list of variables, or the test reagent goes into the reaction mixture at the start.", "correct": "describe steps; sample into iodine at intervals, or test with Benedict's after a set time.", "atoms": ["0610-PS-A30", "0610-PS-A02"]}, {"id": "0610-PS-M09", "wrong": "lines can be extended to the origin, table values used as the scale, and readings taken without construction lines.", "correct": "linear scale over more than half the grid; line only through the data; show the reading on the graph.", "atoms": ["0610-PS-A21", "0610-PS-A22"]}, {"id": "0610-PS-M10", "wrong": "to pin down an optimum, widen the range or repeat.", "correct": "test extra values at smaller intervals around the apparent optimum.", "atoms": ["0610-PS-A16"]}, {"id": "0610-PS-M11", "wrong": "foam height, bubble counts or an upright measuring cylinder give an accurate gas volume.", "correct": "collect gas in a gas syringe or an upturned measuring cylinder over water.", "atoms": ["0610-PS-A04"]}, {"id": "0610-PS-M12", "wrong": "mm3 converts to cm3 by dividing by 10, or the unit can be left in mm3.", "correct": "1 cm3 = 1000 mm3; convert before calculating or divide the mm3 result by 1000.", "atoms": ["0610-PS-A24"]}]}
|
data/chapters/0620_ch04.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"id": "0620_ch04", "subject": "Chemistry", "code": "0620", "chapter": "Chemical formulae and equations", "text": "Status: model-generated, unreviewed by a subject teacher. Generated 2 Oct 2026.\n\n# 0620 Chemistry — Chapter 4: Chemical formulae and equations (syllabus 3.1 Formulae)\n\nScope: syllabus section 3.1, Core 1–4 and Supplement 5–8 (students sit Extended). Arithmetic with formulae (Mr, moles, empirical formula from data, molecular formula from Mr) belongs to chapter 5 (`ch05_chemical_calculations.md`); ionic half-equations belong to electrolysis (section 4). Paragraphs [P1]… are the anchors the knowledge atoms point to. Stage-1 pipeline text; see ATOMS_PLAN.md.\n\n## A. One rule underneath everything\n\n[P1] Chemistry needs a written language because the things it describes are invisible and come in vast numbers. The language rests on two conservation laws. **Atoms are conserved**: a reaction regroups atoms but never creates, destroys or converts them into atoms of another element. **Charge is conserved**: electrons can move from one particle to another, but the total charge before and after a change is the same. A formula is a record of *which atoms, and how many, are grouped together*; an equation is a record of *how the groups change while the atoms and the charge stay the same*. Every rule in this chapter is a way of keeping those two counts honest on paper; a forgotten rule can be rebuilt by asking \"is every atom accounted for, and does the charge add up?\"\n\n## B. Symbols and the formulae of elements\n\n[P2] Each element has a one- or two-letter symbol; the first letter is a capital and the second is lower case (Co is cobalt, CO is carbon monoxide — case carries meaning). The formula of an element shows the particle it is made of. Most elements are written as single atoms, because in the solid or liquid they form a giant structure (metals, carbon, silicon) or exist as separate atoms (the noble gases, He, Ne, Ar). Seven elements exist as **diatomic molecules** and must always be written with a 2 when they appear as the element: H₂, N₂, O₂, F₂, Cl₂, Br₂, I₂. Writing O, H or Cl for the element in an equation is the commonest formula error in the examiner reports. Inside a compound the 2 disappears, because the atoms are bonded to something else: oxygen is O₂, but water is H₂O.\n\n## C. Reading a formula\n\n[P3] A formula is a count. A subscript counts the atom (or bracketed group) immediately before it: H₂SO₄ contains 2 H, 1 S and 4 O. A subscript after a bracket multiplies everything inside the bracket: Ca(NO₃)₂ contains 1 Ca, 2 N and 6 O. Brackets are needed only when a group of atoms that travels together (a compound ion such as NO₃⁻ or OH⁻) appears more than once; NaNO₃ needs no bracket, and writing Na(NO₃) is redundant. A large number written *in front of* a formula in an equation is a **coefficient**; it multiplies the whole formula: 3H₂SO₄ means 6 H, 3 S and 12 O. The raised dot in a hydrated salt such as CuSO₄·5H₂O means \"together with\": one formula unit of copper(II) sulfate is combined with five water molecules, so the unit contains 1 Cu, 1 S, 9 O and 10 H. The dot is not a multiplication sign. The formula of a compound never carries the charges of its ions: magnesium chloride is MgCl₂, not Mg²⁺Cl₂⁻.\n\n## D. Molecular formula: what is in one molecule\n\n[P4] A substance made of separate molecules has a definite particle, so it can be described exactly. The **molecular formula** gives the number and type of each atom in one molecule: ethane is C₂H₆, glucose is C₆H₁₂O₆, ammonia is NH₃. To deduce a molecular formula from a model, a ball-and-stick picture, a displayed formula or a structural formula, count each kind of atom, including every atom hidden inside a group (CH₃, OH, COOH). For a displayed formula it helps to tick each atom as it is counted. Organic molecular formulae are written C first, then H, then the other elements (C₂H₆O for ethanol). A structural formula such as CH₃CH₂OH carries the same atoms as C₂H₆O; the molecular formula adds them up and loses the arrangement, which is why isomers can share one molecular formula.\n\n## E. Empirical formula: the simplest ratio\n\n[P5] Many substances have no molecule to count. An ionic lattice or a giant covalent structure is the same pattern repeated an indefinite number of times, so the only thing that can be stated is the *ratio* of the particles. The **empirical formula** is the simplest whole-number ratio of the different atoms or ions in a compound. For ionic compounds (NaCl, MgO, Al₂O₃) and giant covalent substances (SiO₂) the formula written is always the empirical formula. For molecular substances the empirical formula is found from the molecular formula by dividing every subscript by their highest common factor: C₂H₆ → CH₃; C₆H₁₂O₆ → CH₂O; H₂O₂ → HO; C₄H₈O₂ → C₂H₄O. If the highest common factor is 1, the two formulae are identical (H₂O, CH₄, C₃H₈, CO₂). The same reasoning explains why a polymer has no fixed molecular formula: its chains are of indefinite and varying length, so only its repeat unit (and an empirical formula) can be written. Finding an empirical formula from masses or percentages, and a molecular formula from an empirical formula plus Mr, are calculations; they are treated in chapter 5.\n\n## F. Where ionic charges come from\n\n[P6] An ion is an atom or group of atoms that has gained or lost electrons. For main-group elements the charge follows from the electronic configuration: atoms lose or gain the fewest electrons that leave a full outer shell. So Group I metals form 1+ ions (Na⁺, K⁺, Li⁺), Group II form 2+ (Mg²⁺, Ca²⁺, Ba²⁺), aluminium in Group III forms Al³⁺; non-metals in Group V, VI and VII gain 3, 2 or 1 electrons (N³⁻, O²⁻, S²⁻, F⁻, Cl⁻, Br⁻, I⁻). Hydrogen forms H⁺. Group IV and Group VIII elements do not normally form simple ions. Transition elements can form more than one ion, so their names carry a **Roman numeral** that gives the oxidation number, which for a simple metal ion equals its charge: iron(II) is Fe²⁺, iron(III) is Fe³⁺, copper(II) is Cu²⁺. The numeral is a positive number only; it says nothing about the other ion. Zinc (Zn²⁺) and silver (Ag⁺) have one common ion and usually carry no numeral.\n\n[P7] Some ions are groups of atoms covalently bonded together that carry an overall charge: the **compound ions**. They must be learned because they cannot be deduced from a group number: ammonium NH₄⁺, hydroxide OH⁻, nitrate NO₃⁻, carbonate CO₃²⁻, sulfate SO₄²⁻, hydrogencarbonate HCO₃⁻, phosphate PO₄³⁻, and the organic anion ethanoate CH₃COO⁻ (in general, a carboxylic acid RCOOH gives the anion RCOO⁻). Names give clues: an ending *-ide* means a single element (or hydroxide), *-ate* means the ion contains oxygen. Sulfide S²⁻ and sulfate SO₄²⁻ are different ions; confusing them is a recorded examiner complaint. The charge of a compound ion belongs to the whole group, which is why the group goes in a bracket when there is more than one of it.\n\n## G. Formulae of ionic compounds from charges\n\n[P8] An ionic compound is electrically neutral, so its formula is the smallest whole-number ratio of ions in which the positive and negative charges cancel. The method: write both ions with their charges; find the lowest common multiple of the two charge sizes; take enough of each ion to reach it. Sodium oxide: Na⁺ and O²⁻; LCM 2; two Na⁺ per O²⁻ → Na₂O. Aluminium sulfate: Al³⁺ and SO₄²⁻; LCM 6; two Al³⁺ and three SO₄²⁻ → Al₂(SO₄)₃. Ammonium carbonate: NH₄⁺ and CO₃²⁻ → (NH₄)₂CO₃. Iron(III) hydroxide: Fe³⁺ and OH⁻ → Fe(OH)₃. The \"swap the charge numbers\" shortcut gives the same answer because it builds the LCM automatically, but it must be followed by simplifying (Mg²⁺ and O²⁻ swap to Mg₂O₂, which simplifies to MgO). The method works for unfamiliar ions too: given a chromate ion CrO₄²⁻, potassium chromate must be K₂CrO₄ and silver chromate Ag₂CrO₄; given phosphate PO₄³⁻, calcium phosphate is Ca₃(PO₄)₂. If a compound contains more than two kinds of ion, every positive charge is added and every negative charge is added, and the two totals must be equal.\n\n[P9] The same neutrality argument runs backwards. From a formula, the charge on an unknown ion follows from the known one: in Cr₂(SO₄)₃ three sulfate ions carry 6−, so two chromium ions carry 6+ and each is Cr³⁺. From a salt formula, the anion can be read off: in Na₂SeO₃ two Na⁺ balance one SeO₃²⁻, and the parent acid (which supplies H⁺ in place of Na⁺) is H₂SeO₃. A formula can also be deduced from a **model or diagram** of a lattice or molecule by counting the relative numbers of each particle: a lattice diagram with equal numbers of + and − ions of single charge represents a 1 : 1 compound such as KBr, while one with twice as many anions as cations represents a compound like MgCl₂. If the charges are shown, neutrality is a check on the count. A harder version names a mixed-ion solid: if it contains only Co²⁺, Co³⁺ and O²⁻, the formula must be neutral *and* need both cobalt ions; Co₃O₄ (2+ plus 3+ plus 3+ = 8+, four O²⁻ = 8−) fits, Co₂O₃ does not.\n\n## H. Formulae to know by heart\n\n[P10] Statement 3.1.1 asks for the formulae of the substances named anywhere in the syllabus. Most follow from [P6]–[P8], but a working set must be instant: H₂O, CO₂, CO, NH₃, CH₄, SO₂, SO₃, NO₂, NO; the acids HCl, H₂SO₄, HNO₃, CH₃COOH; NaOH, Ca(OH)₂, CaCO₃, CaO, Fe₂O₃, Al₂O₃, SiO₂, CuO, ZnCl₂, Cu(NO₃)₂, (NH₄)₂SO₄; and the two hydrated salts named in the syllabus, CuSO₄·5H₂O (blue) and CoCl₂·6H₂O (pink). When a formula is asked for, a name earns nothing; when a formula is printed in the question, copy it exactly — examiner reports repeatedly note candidates changing a formula they were given.\n\n## I. Equations: from words to balanced symbols\n\n[P11] A **word equation** names reactants and products: magnesium + hydrochloric acid → magnesium chloride + hydrogen. It records what happens but not in what proportions. A **symbol equation** replaces names with formulae and must then obey conservation of atoms: the same number of each kind of atom on each side. Writing the correct formulae comes first and is a separate mark in every Paper 4 equation item (the mark scheme's M1 is usually \"correct species\" or \"correct product\"); balancing is the second mark. A word equation is never accepted where a \"chemical equation\" or \"symbol equation\" is asked for.\n\n[P12] **Balancing changes coefficients, never subscripts.** Changing H₂O to H₂O₂ to \"fix\" the oxygen count produces a different substance, hydrogen peroxide, and the equation then describes a different reaction. A coefficient only changes how many particles of the same substance take part. A dependable procedure: (1) write correct formulae for everything; (2) balance an element that appears in only one substance on each side, starting with the formula containing the most atoms; (3) balance elements that appear as the free element (O₂, H₂, Cl₂, metals) last, because their coefficient changes only that one element; (4) treat a compound ion that survives unchanged (SO₄, NO₃) as a single unit; (5) recount every element, and reduce coefficients to the smallest whole numbers. Example: Al + O₂ → Al₂O₃. Oxygen needs a common multiple of 2 and 3, so 3O₂ and 2Al₂O₃; then 4Al: 4Al + 3O₂ → 2Al₂O₃. Never balance by writing Al₂ or 2Al₂ for the metal, or by inserting extra species such as H or O atoms that the reaction does not contain.\n\n[P13] **Combustion and \"odd oxygen\".** For a hydrocarbon or other C–H–O compound burning completely, balance C (into CO₂), then H (into H₂O), then count the oxygen atoms needed on the right and supply them as O₂. If that number is odd, double every coefficient. Butane: C₄H₁₀ + O₂ → 4CO₂ + 5H₂O needs 13 O atoms, i.e. 6½ O₂; doubling gives 2C₄H₁₀ + 13O₂ → 8CO₂ + 10H₂O. If the fuel contains oxygen, subtract its oxygen atoms before counting O₂. The same atom-counting identifies an unknown product: if C₁₀H₂₂ cracks into C₂H₄ and one other molecule, the other must be C₈H₁₈, because all ten carbons and twenty-two hydrogens must be accounted for. Reversible reactions are written with ⇌ instead of →; the balancing rules do not change.\n\n## J. State symbols\n\n[P14] State symbols show the physical state of each substance under the conditions of the reaction: **(s)** solid, **(l)** liquid, **(g)** gas, **(aq)** aqueous, i.e. dissolved in water. Aqueous is not a synonym for liquid: dilute hydrochloric acid is HCl(aq), because hydrogen chloride is dissolved in water, while water itself is H₂O(l) and is never (aq). Rules that cover nearly every examined case: a metal, a metal oxide, a carbonate added as a powder and any precipitate are (s); acids, alkalis and soluble salts in solution are (aq); water formed in a reaction at room temperature is (l); gases at room temperature and pressure (H₂, O₂, CO₂, Cl₂, NH₃, SO₂) are (g); a halogen produced in solution, such as bromine in a displacement, is (aq). The state depends on the conditions given: water from a combustion at high temperature is H₂O(g), and a liquid product like silicon(IV) chloride at r.t.p. is (l). State symbols go in brackets, lower case, after each formula; when a question says \"include state symbols\", every species needs one.\n\n## K. Deducing an equation from information\n\n[P15] Supplement statement 3.1.8 asks for the equation of a reaction the student may never have seen, from information supplied. The move is always the same: (1) list the reactants and products the question names, and write their formulae (using any formula printed in the question exactly); (2) if a product is not named, deduce it from a reaction pattern — acid + metal → salt + hydrogen; acid + base (oxide or hydroxide) → salt + water; acid + carbonate → salt + water + carbon dioxide; metal + water → hydroxide + hydrogen (or oxide + hydrogen with steam); element + oxygen → oxide; a more reactive metal or halogen displaces a less reactive one from its compound; thermal decomposition of a carbonate → oxide + carbon dioxide; complete combustion → carbon dioxide + water — or from the atom count, as in [P13]; (3) balance; (4) add state symbols if asked. In a typical unfamiliar case a metal oxide reacts with sodium hydroxide to give water and a salt of a stated anion; the salt's formula comes from charges ([P8]) and the rest is balancing. Examiner reports show the commonest failure is a wrong product formula (K₂O for potassium hydroxide, ZnCl for zinc chloride), not the balancing.\n\n## L. Ionic equations\n\n[P16] An ionic compound dissolved in water is not a set of molecules but a collection of separate, mobile ions; aqueous sodium chloride is Na⁺(aq) and Cl⁻(aq). When two such solutions are mixed and a reaction occurs, only some of the ions change. The ones that are present unchanged before and after are **spectator ions**, and an **ionic equation** leaves them out, showing only the particles that actually react. The procedure: (1) write the full balanced symbol equation with state symbols; (2) split every aqueous ionic substance (soluble salts, strong acids, alkalis) into its ions; (3) do *not* split solids, precipitates, water, gases, covalent molecules such as halogens, or metals; (4) cross out ions that appear identically on both sides; (5) check that the result balances in atoms **and** in total charge. Mixing silver nitrate and sodium chloride solutions: Ag⁺(aq) + NO₃⁻(aq) + Na⁺(aq) + Cl⁻(aq) → AgCl(s) + Na⁺(aq) + NO₃⁻(aq), leaving Ag⁺(aq) + Cl⁻(aq) → AgCl(s).\n\n[P17] Three families cover almost every ionic equation examined. **Precipitation**: two aqueous ions on the left, one solid on the right, state symbols always (aq) + (aq) → (s); a shortcut is to take the precipitate's formula and split it into its ions, so PbI₂ comes from Pb²⁺(aq) + 2I⁻(aq) and Cu(OH)₂ from Cu²⁺(aq) + 2OH⁻(aq). **Neutralisation** of any acid by any alkali reduces to H⁺(aq) + OH⁻(aq) → H₂O(l), which is why every such reaction has the same essential change. **Displacement**: a metal and a metal ion, Fe(s) + Cu²⁺(aq) → Fe²⁺(aq) + Cu(s), or a halogen molecule and a halide ion, Cl₂(aq) + 2I⁻(aq) → 2Cl⁻(aq) + I₂(aq); here the sodium or potassium ions are the spectators, and the halogens stay as diatomic molecules because they are covalent. In every case the charge check is decisive: 2Al(s) + 3Cu²⁺(aq) → 2Al³⁺(aq) + 3Cu(s) has 6+ on each side, while Al + Cu²⁺ → Al³⁺ + Cu balances atoms but not charge. An ionic half-equation (Cu²⁺ + 2e⁻ → Cu) is a different object: it shows one electrode process with electrons written explicitly, and belongs to electrolysis and redox.\n\n## M. Conventions and bridges\n\n[P18] Marking conventions for this chapter are stable across the archive. Formula items are one mark, formula only; a name, a formula with charges left in, a wrong case (CL, Co for CO) or a subscript written full size is not credited. Equation items are worth 1–3 marks: M1 for the correct species (often just the key product), M2 for the fully balanced equation, M3 for state symbols when asked; multiples of a correct equation and fractions such as ½O₂ are usually accepted, but an equation with extra species, charges in compound formulae or the reactants on the wrong side is not. Ionic precipitation equations earn M1 for the precipitate as the only product, M2 for exactly the right two ions as the only reactants, M3 for (aq) + (aq) → (s). Bridges: chapter 5 reads balanced equations as mole ratios and calculates formulae from data; electrolysis (section 4) builds half-equations on [P16]–[P17]; redox (section 6) explains the Roman numeral; acids and salts (section 7) supply the reaction patterns and solubility rules used in [P15]–[P17]; organic chemistry (section 11) supplies the molecules to which [P4], [P5] and [P13] are applied.\n\n## Coverage matrix\n\n| Syllabus statement | Wording (abridged, official) | Tier | Paragraphs |\n|---|---|---|---|\n| 3.1.1 | State the formulae of the elements and compounds named in the subject content | Core | P2, P3, P7, P10 |\n| 3.1.2 | Define the molecular formula of a compound as the number and type of different atoms in one molecule | Core | P4, P5 |\n| 3.1.3 | Deduce the formula of a simple compound from the relative numbers of atoms present in a model or a diagrammatic representation | Core | P4, P9 |\n| 3.1.4 | Construct word equations and symbol equations to show how reactants form products, including state symbols | Core | P11, P12, P13, P14 |\n| 3.1.5 | Define the empirical formula of a compound as the simplest whole number ratio of the different atoms or ions in a compound | Supplement | P5 |\n| 3.1.6 | Deduce the formula of an ionic compound from the relative numbers of the ions present in a model or a diagrammatic representation or from the charges on the ions | Supplement | P6, P7, P8, P9 |\n| 3.1.7 | Construct symbol equations with state symbols, including ionic equations | Supplement | P14, P16, P17 |\n| 3.1.8 | Deduce the symbol equation with state symbols for a chemical reaction, given relevant information | Supplement | P13, P15 |\n| — bridge, no statement | The two conservation laws behind every rule | — | P1 |\n| — bridge, no statement | Marking conventions; links to chapter 5, sections 4, 6, 7, 11 | — | P18 |\n\nGaps: none of 3.1.1–3.1.8 lacks a paragraph. Scope notes: ion charges from group number (P6) formally belong to section 2 (ionic bonding) but are the prerequisite for 3.1.6 and are kept as a bridge; the meaning of the Roman numeral (P6) is formally 6.4.1 but is needed to write formulae from names. Not covered on purpose: empirical formula from composition data and molecular formula from Mr (chapter 5, 3.3.7); ionic half-equations (section 4); general formulae of homologous series and displayed formulae (section 11).\n", "atoms": [{"id": "0620-3.1-A01", "type": "concept", "statement": "Atoms are conserved in a chemical reaction: they are regrouped, never created, destroyed or turned into another element.", "why": "Reactions rearrange bonds and electrons; nuclei are untouched.", "prerequisites": [], "tier": "core", "paragraphs": "P1"}, {"id": "0620-3.1-A02", "type": "concept", "statement": "Charge is conserved: the total charge on each side of an equation is the same.", "why": "Electrons move between particles but are not created or destroyed.", "prerequisites": ["0620-3.1-A01"], "tier": "supplement", "paragraphs": "P1"}, {"id": "0620-3.1-A03", "type": "fact", "statement": "Element symbols start with a capital letter; a second letter is lower case, and case carries meaning (Co is cobalt, CO is carbon monoxide).", "why": "Symbols are a shared international code.", "prerequisites": [], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.1-A04", "type": "fact", "statement": "Seven elements exist as diatomic molecules and are written H2, N2, O2, F2, Cl2, Br2, I2 whenever they appear as the element.", "why": "Their atoms pair up by a covalent bond to fill outer shells.", "prerequisites": ["0620-3.1-A03"], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.1-A05", "type": "fact", "statement": "Other elements are written as single atoms in equations: metals, carbon, silicon, sulfur and the noble gases.", "why": "Giant structures and monatomic gases have no small molecule to count.", "prerequisites": ["0620-3.1-A03"], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.1-A06", "type": "representation", "statement": "A subscript counts the atom (or bracketed group) immediately before it: H2SO4 has 2 H, 1 S, 4 O.", "why": "A formula is a count of atoms.", "prerequisites": ["0620-3.1-A03"], "tier": "core", "paragraphs": "P3"}, {"id": "0620-3.1-A07", "type": "representation", "statement": "A subscript after a bracket multiplies everything inside; brackets are used only when a compound ion appears more than once (Ca(NO3)2, but NaNO3).", "why": "The compound ion travels as one unit.", "prerequisites": ["0620-3.1-A06"], "tier": "supplement", "paragraphs": "P3"}, {"id": "0620-3.1-A08", "type": "representation", "statement": "A coefficient in front of a formula multiplies the whole formula: 3H2SO4 contains 6 H, 3 S, 12 O.", "why": "The coefficient counts whole formula units.", "prerequisites": ["0620-3.1-A06"], "tier": "core", "paragraphs": "P3"}, {"id": "0620-3.1-A09", "type": "representation", "statement": "The raised dot in a hydrated salt (CuSO4.5H2O) means together with: whole water molecules are added, not multiplied.", "why": "Water of crystallisation is part of the crystal formula unit.", "prerequisites": ["0620-3.1-A06"], "tier": "core", "paragraphs": "P3"}, {"id": "0620-3.1-A10", "type": "fact", "statement": "A compound formula never shows the ion charges: MgCl2, not Mg2+Cl2-.", "why": "The charges cancel in the neutral compound; they are shown only on separate ions.", "prerequisites": ["0620-3.1-A06"], "tier": "supplement", "paragraphs": "P3"}, {"id": "0620-3.1-A11", "type": "fact", "statement": "Molecular formula: the number and type of different atoms in one molecule.", "why": "A molecular substance has a definite particle that can be counted.", "prerequisites": ["0620-3.1-A06"], "tier": "core", "paragraphs": "P4"}, {"id": "0620-3.1-A12", "type": "procedure", "statement": "Deduce a molecular formula from a model, displayed or structural formula by counting each kind of atom, including atoms inside groups (CH3, OH, COOH).", "why": "The formula is just the atom count of the drawn particle.", "prerequisites": ["0620-3.1-A11"], "tier": "core", "paragraphs": "P4"}, {"id": "0620-3.1-A13", "type": "concept", "statement": "A molecular formula loses the arrangement of atoms, so different compounds (isomers) can share one molecular formula; organic formulae are written C, then H, then other elements.", "why": "Counting atoms discards how they are joined.", "prerequisites": ["0620-3.1-A11"], "tier": "core", "paragraphs": "P4"}, {"id": "0620-3.1-A14", "type": "fact", "statement": "Empirical formula: the simplest whole-number ratio of the different atoms or ions in a compound.", "why": "A ratio is all that can be stated when there is no fixed particle size.", "prerequisites": ["0620-3.1-A11"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0620-3.1-A15", "type": "concept", "statement": "Ionic lattices and giant covalent substances (NaCl, SiO2) have only an empirical formula, because there is no separate molecule.", "why": "A giant structure repeats indefinitely; only the ratio is fixed.", "prerequisites": ["0620-3.1-A14"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0620-3.1-A16", "type": "procedure", "statement": "Find an empirical formula from a molecular formula by dividing every subscript by their highest common factor; if it is 1 the two formulae are the same.", "why": "Dividing keeps the ratio and makes it simplest.", "prerequisites": ["0620-3.1-A14", "0620-3.1-A12"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0620-3.1-A17", "type": "concept", "statement": "A polymer has no single molecular formula because its chains are of indefinite and varying length; only the repeat unit can be written.", "why": "There is no one molecule size to count.", "prerequisites": ["0620-3.1-A11", "0620-3.1-A14"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0620-3.1-A18", "type": "relationship", "statement": "Main-group ion charge follows the group: I 1+, II 2+, Al 3+, V 3-, VI 2-, VII 1-.", "why": "Atoms gain or lose the fewest electrons that leave a full outer shell.", "prerequisites": [], "tier": "supplement", "paragraphs": "P6"}, {"id": "0620-3.1-A19", "type": "fact", "statement": "Group IV and Group VIII elements do not normally form simple ions; hydrogen forms H+.", "why": "Gaining or losing four electrons is too costly; noble gases already have full shells.", "prerequisites": ["0620-3.1-A18"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0620-3.1-A20", "type": "fact", "statement": "A Roman numeral in a name gives the oxidation number of the metal, equal to its ion charge: iron(II) Fe2+, iron(III) Fe3+, copper(II) Cu2+; it is always positive and refers to the metal only.", "why": "Transition metals form more than one ion, so the name must say which.", "prerequisites": ["0620-3.1-A18"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0620-3.1-A21", "type": "fact", "statement": "Zinc forms only Zn2+ and silver only Ag+, so their names usually carry no numeral.", "why": "One common ion needs no label.", "prerequisites": ["0620-3.1-A20"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0620-3.1-A22", "type": "fact", "statement": "Compound ions to know: NH4+, OH-, NO3-, CO3 2-, SO4 2-, HCO3-, PO4 3-.", "why": "Their charges cannot be deduced from a group number, so they are learned.", "prerequisites": ["0620-3.1-A18"], "tier": "supplement", "paragraphs": "P7"}, {"id": "0620-3.1-A23", "type": "fact", "statement": "A carboxylic acid RCOOH gives the anion RCOO- (ethanoate CH3COO-), so its salts are written like other salts: (CH3COO)2Ca.", "why": "The acid loses H+ from the COOH group.", "prerequisites": ["0620-3.1-A22"], "tier": "supplement", "paragraphs": "P7"}, {"id": "0620-3.1-A24", "type": "relationship", "statement": "Name endings: -ide means a single element (or hydroxide), -ate means the ion contains oxygen; sulfide S2- and sulfate SO4 2- are different ions.", "why": "The ending encodes the composition.", "prerequisites": ["0620-3.1-A22"], "tier": "supplement", "paragraphs": "P7"}, {"id": "0620-3.1-A25", "type": "concept", "statement": "An ionic compound is neutral: total positive charge equals total negative charge.", "why": "Opposite charges must cancel in a stable compound.", "prerequisites": ["0620-3.1-A02", "0620-3.1-A18"], "tier": "supplement", "paragraphs": "P8"}, {"id": "0620-3.1-A26", "type": "procedure", "statement": "Formula from charges: write both ions, find the lowest common multiple of the charge sizes, take enough of each ion to reach it, bracket a compound ion used more than once (Al2(SO4)3).", "why": "This is the smallest neutral ratio.", "prerequisites": ["0620-3.1-A25", "0620-3.1-A07", "0620-3.1-A10"], "tier": "supplement", "paragraphs": "P8"}, {"id": "0620-3.1-A27", "type": "procedure", "statement": "The swap-the-charges shortcut must be followed by simplifying (Mg2O2 becomes MgO).", "why": "Swapping builds the LCM but not always the simplest ratio.", "prerequisites": ["0620-3.1-A26"], "tier": "supplement", "paragraphs": "P8"}, {"id": "0620-3.1-A28", "type": "procedure", "statement": "Apply the charge method to supplied or unfamiliar ions, and to compounds with three kinds of ion, by totalling all positive and all negative charges.", "why": "Neutrality does not depend on knowing the ion beforehand.", "prerequisites": ["0620-3.1-A26"], "tier": "supplement", "paragraphs": "P8"}, {"id": "0620-3.1-A29", "type": "procedure", "statement": "Inverse: find an unknown ion charge from a formula and the known ion (Cr2(SO4)3 gives Cr3+).", "why": "Neutrality fixes the missing charge.", "prerequisites": ["0620-3.1-A25"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0620-3.1-A30", "type": "procedure", "statement": "Read the anion from a salt formula, and the parent acid by replacing the metal ions with H+ (Na2SO3 gives SO3 2- and H2SO3).", "why": "A salt is an acid with its H+ replaced by metal ions.", "prerequisites": ["0620-3.1-A29", "0620-3.1-A22"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0620-3.1-A31", "type": "procedure", "statement": "Deduce a formula from a model or lattice diagram by counting the relative numbers of each particle, checking neutrality when charges are shown.", "why": "The ratio in the picture is the ratio in the formula.", "prerequisites": ["0620-3.1-A25", "0620-3.1-A12"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0620-3.1-A32", "type": "procedure", "statement": "For a compound containing two ions of one element (mixed valence), choose the formula that is both neutral and contains every stated ion.", "why": "Neutrality alone admits formulas that lack one of the ions.", "prerequisites": ["0620-3.1-A25"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0620-3.1-A33", "type": "fact", "statement": "Formulae of named molecular compounds: H2O, CO2, CO, NH3, CH4, SO2, SO3, NO2, NO.", "why": "Listed across the syllabus content.", "prerequisites": ["0620-3.1-A03", "0620-3.1-A04"], "tier": "core", "paragraphs": "P10"}, {"id": "0620-3.1-A34", "type": "fact", "statement": "Formulae of the common acids: HCl, H2SO4, HNO3, CH3COOH.", "why": "Each is H+ combined with a known anion.", "prerequisites": ["0620-3.1-A22", "0620-3.1-A33"], "tier": "core", "paragraphs": "P10"}, {"id": "0620-3.1-A35", "type": "fact", "statement": "Hydrated copper(II) sulfate is CuSO4.5H2O (blue) and hydrated cobalt(II) chloride is CoCl2.6H2O (pink).", "why": "Named in the syllabus as tests for water.", "prerequisites": ["0620-3.1-A09"], "tier": "core", "paragraphs": "P10"}, {"id": "0620-3.1-A36", "type": "technique", "statement": "When a formula is asked for, give a formula, not a name; when a formula is printed in the question, copy it exactly.", "why": "A name scores nothing for a formula mark, and the mark scheme assumes the given formula.", "prerequisites": ["0620-3.1-A33"], "tier": "core", "paragraphs": "P10; P18"}, {"id": "0620-3.1-A37", "type": "representation", "statement": "A word equation names reactants and products (reactants -> products); it is not accepted where a chemical or symbol equation is asked for.", "why": "Names carry identity but not proportions.", "prerequisites": [], "tier": "core", "paragraphs": "P11"}, {"id": "0620-3.1-A38", "type": "procedure", "statement": "First step of any symbol equation: write the correct formula of every species; this is usually the first mark (M1).", "why": "Balancing a wrong formula balances the wrong reaction.", "prerequisites": ["0620-3.1-A33", "0620-3.1-A26", "0620-3.1-A04"], "tier": "core", "paragraphs": "P11"}, {"id": "0620-3.1-A39", "type": "concept", "statement": "Balance by changing coefficients only, never subscripts or formulae.", "why": "A changed subscript is a different substance (H2O2 is not H2O).", "prerequisites": ["0620-3.1-A01", "0620-3.1-A06"], "tier": "core", "paragraphs": "P12"}, {"id": "0620-3.1-A40", "type": "procedure", "statement": "Balancing order: an element found in one substance each side first (largest formula first), compound ions as units, free elements last; recount everything and use the smallest whole numbers.", "why": "Free elements change only their own count, so they mop up at the end.", "prerequisites": ["0620-3.1-A39", "0620-3.1-A08"], "tier": "core", "paragraphs": "P12"}, {"id": "0620-3.1-A41", "type": "procedure", "statement": "Combustion: balance C into CO2, then H into H2O, count the O needed, supply it as O2 (subtract any O in the fuel); if the O2 count is odd or half, double all coefficients.", "why": "Oxygen is the only free element and is fixed last.", "prerequisites": ["0620-3.1-A40", "0620-3.1-A49"], "tier": "core", "paragraphs": "P13"}, {"id": "0620-3.1-A42", "type": "procedure", "statement": "Deduce an unknown formula in an equation from the atom count (missing product; cracking products from a given ratio).", "why": "Every atom on the left must appear on the right.", "prerequisites": ["0620-3.1-A01", "0620-3.1-A06"], "tier": "core", "paragraphs": "P13"}, {"id": "0620-3.1-A43", "type": "representation", "statement": "A reversible reaction is written with a double arrow; balancing rules are unchanged.", "why": "The same atoms are conserved in both directions.", "prerequisites": ["0620-3.1-A40"], "tier": "core", "paragraphs": "P13"}, {"id": "0620-3.1-A44", "type": "fact", "statement": "State symbols: (s) solid, (l) liquid, (g) gas, (aq) dissolved in water; aqueous is not the same as liquid.", "why": "An equation should show the physical form of each substance.", "prerequisites": [], "tier": "core", "paragraphs": "P14"}, {"id": "0620-3.1-A45", "type": "relationship", "statement": "Assigning states: metals, oxides, powdered carbonates and precipitates (s); acids, alkalis and soluble salts in solution (aq); water (l); gases at r.t.p. (g); a halogen formed in solution (aq).", "why": "Each follows from the substance and whether it is dissolved.", "prerequisites": ["0620-3.1-A44"], "tier": "core", "paragraphs": "P14"}, {"id": "0620-3.1-A46", "type": "relationship", "statement": "The state depends on the conditions stated: water from a hot combustion is (g); a liquid product at r.t.p. is (l).", "why": "State symbols describe the substance under the reaction conditions.", "prerequisites": ["0620-3.1-A45"], "tier": "supplement", "paragraphs": "P14"}, {"id": "0620-3.1-A47", "type": "procedure", "statement": "Deduce an equation from information: list the named species, write formulae (copy given ones), deduce unnamed products from a reaction pattern or the atom count, balance, add state symbols if asked.", "why": "The equation is built from conservation plus a known pattern.", "prerequisites": ["0620-3.1-A38", "0620-3.1-A40", "0620-3.1-A45", "0620-3.1-A48"], "tier": "supplement", "paragraphs": "P15"}, {"id": "0620-3.1-A48", "type": "relationship", "statement": "Acid patterns: acid + metal -> salt + hydrogen; acid + base -> salt + water; acid + carbonate -> salt + water + carbon dioxide; reactive metal + water -> hydroxide + hydrogen.", "why": "Bridge from section 7 (acids) and 9 (metals).", "prerequisites": [], "tier": "core", "paragraphs": "P15"}, {"id": "0620-3.1-A49", "type": "relationship", "statement": "Other patterns: element + oxygen -> oxide; a more reactive metal or halogen displaces a less reactive one; carbonate on heating -> oxide + carbon dioxide; complete combustion -> carbon dioxide + water.", "why": "Bridge from sections 9, 10 and 11.", "prerequisites": [], "tier": "core", "paragraphs": "P15"}, {"id": "0620-3.1-A50", "type": "concept", "statement": "A dissolved ionic compound exists as separate ions; ions present unchanged before and after a reaction are spectator ions.", "why": "Only the particles that change belong in a description of the change.", "prerequisites": ["0620-3.1-A02", "0620-3.1-A44"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0620-3.1-A51", "type": "procedure", "statement": "Ionic equation recipe: full equation; split aqueous ionic substances into ions; do not split solids, water, gases, covalent molecules or metals; cancel spectators; check atoms and charge.", "why": "Leaves exactly the particles that react.", "prerequisites": ["0620-3.1-A50", "0620-3.1-A40"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0620-3.1-A52", "type": "representation", "statement": "Precipitation ionic equation: two aqueous ions -> one solid, (aq) + (aq) -> (s); take the precipitate formula and split it into its ions to get the left-hand side (Pb2+ + 2I- -> PbI2).", "why": "The precipitate is the only new substance; its ions came from the two solutions.", "prerequisites": ["0620-3.1-A51", "0620-3.1-A26"], "tier": "supplement", "paragraphs": "P17"}, {"id": "0620-3.1-A53", "type": "fact", "statement": "Every acid-alkali neutralisation has the ionic equation H+(aq) + OH-(aq) -> H2O(l).", "why": "The salt ions are spectators in every case.", "prerequisites": ["0620-3.1-A51"], "tier": "supplement", "paragraphs": "P17"}, {"id": "0620-3.1-A54", "type": "representation", "statement": "Displacement ionic equations: metal + metal ion (Fe + Cu2+ -> Fe2+ + Cu) or halogen molecule + halide ion (Cl2 + 2I- -> 2Cl- + I2); the halogens stay diatomic and the Group I cations are spectators.", "why": "Covalent halogen molecules are not split; only the halide ions change.", "prerequisites": ["0620-3.1-A51", "0620-3.1-A04"], "tier": "supplement", "paragraphs": "P17"}, {"id": "0620-3.1-A55", "type": "procedure", "statement": "Balance an ionic equation for charge as well as atoms (2Al + 3Cu2+ -> 2Al3+ + 3Cu has 6+ on each side).", "why": "Charge is conserved.", "prerequisites": ["0620-3.1-A02", "0620-3.1-A51"], "tier": "supplement", "paragraphs": "P17"}, {"id": "0620-3.1-A56", "type": "concept", "statement": "An ionic half-equation is a different object: one electrode process with electrons written explicitly; it belongs to electrolysis and redox.", "why": "It shows only half of a transfer.", "prerequisites": ["0620-3.1-A51"], "tier": "supplement", "paragraphs": "P17"}, {"id": "0620-3.1-A57", "type": "technique", "statement": "Marking pattern: formula items one mark, exact; equations M1 species, M2 balanced, M3 state symbols; precipitation ionic M1 precipitate only, M2 its two ions only, M3 (aq)+(aq)->(s); extra species lose M1.", "why": "Fixed conventions across 2023-25 mark schemes.", "prerequisites": ["0620-3.1-A38"], "tier": "core", "paragraphs": "P18"}], "misconceptions": [{"id": "0620-3.1-M01", "wrong": "the free element can be written as a single atom (O, H, N, Cl, Br) in an equation.", "correct": "write the seven diatomic elements as H2, N2, O2, F2, Cl2, Br2, I2.", "atoms": ["0620-3.1-A04"]}, {"id": "0620-3.1-M02", "wrong": "an equation can be balanced by changing a formula or writing Al2, Fe2, Zn2, Hg2.", "correct": "change only coefficients; a changed formula is a different substance.", "atoms": ["0620-3.1-A39"]}, {"id": "0620-3.1-M03", "wrong": "once the formulae are right the equation is finished.", "correct": "count every element on both sides and balance (a separate mark).", "atoms": ["0620-3.1-A40"]}, {"id": "0620-3.1-M04", "wrong": "a coefficient multiplies only the first element of the formula after it.", "correct": "a coefficient multiplies every atom in the formula (4FeS2 is 4 Fe and 8 S).", "atoms": ["0620-3.1-A08"]}, {"id": "0620-3.1-M05", "wrong": "a salt formula can be written without balancing the charges (ZnCl, Pb2SO4, Pb(SO4)2, AlO).", "correct": "use ion charges and the lowest common multiple so the compound is neutral.", "atoms": ["0620-3.1-A26", "0620-3.1-A25"]}, {"id": "0620-3.1-M06", "wrong": "compound ions can be guessed: nitrate with a 2- charge, ammonium as NH3, sulfide and sulfate interchangeable, nitric acid as H2NO4.", "correct": "learn NO3-, NH4+, SO4 2- (sulfate) vs S2- (sulfide), HNO3.", "atoms": ["0620-3.1-A22", "0620-3.1-A24", "0620-3.1-A34"]}, {"id": "0620-3.1-M07", "wrong": "the ion charges belong inside the compound formula (Mg2+F-2), or fluorine is Fl.", "correct": "compound formulae carry no charges; symbols must be exact.", "atoms": ["0620-3.1-A10", "0620-3.1-A03"]}, {"id": "0620-3.1-M08", "wrong": "the Roman numeral is the charge of the compound, of the non-metal, a valency, or just the number 2.", "correct": "the numeral is the positive oxidation number (ion charge) of the metal only.", "atoms": ["0620-3.1-A20"]}, {"id": "0620-3.1-M09", "wrong": "the group numbers of two elements are the subscripts of their compound (Group V + Group VII gives P5Q7).", "correct": "convert group numbers to ion charges first, then make the compound neutral.", "atoms": ["0620-3.1-A18", "0620-3.1-A26"]}, {"id": "0620-3.1-M10", "wrong": "any neutral formula fits a description of the ions present.", "correct": "the formula must be neutral and contain every stated ion.", "atoms": ["0620-3.1-A32"]}, {"id": "0620-3.1-M11", "wrong": "aqueous means liquid, so water is H2O(aq) and dilute acid is HCl(l).", "correct": "(aq) means dissolved in water; water itself is (l); a dilute acid is (aq).", "atoms": ["0620-3.1-A44", "0620-3.1-A45"]}, {"id": "0620-3.1-M12", "wrong": "an ionic equation is the full symbol equation, or spectator ions may be left in (K+, Na+, NO3-).", "correct": "split aqueous ionic substances and cancel the ions that appear unchanged on both sides.", "atoms": ["0620-3.1-A50", "0620-3.1-A51"]}, {"id": "0620-3.1-M13", "wrong": "an ionic equation only needs the right ions, not the right numbers of them (Pb2+ + Cl- -> PbCl2).", "correct": "balance atoms and total charge: Pb2+ + 2Cl- -> PbCl2.", "atoms": ["0620-3.1-A55", "0620-3.1-A52"]}, {"id": "0620-3.1-M14", "wrong": "in a halogen displacement the halogen molecules carry charges, the ions swap sides, or the reaction is written as a precipitation or half-equation.", "correct": "halogens stay neutral diatomic molecules; the halide ion of the less reactive halogen is the reactant.", "atoms": ["0620-3.1-A54"]}, {"id": "0620-3.1-M15", "wrong": "the molecular formula is the empirical formula.", "correct": "divide the subscripts by their highest common factor.", "atoms": ["0620-3.1-A16"]}, {"id": "0620-3.1-M16", "wrong": "complete combustion gives carbon dioxide and hydrogen, or needs no oxygen on the left.", "correct": "complete combustion: fuel + O2 -> CO2 + H2O.", "atoms": ["0620-3.1-A49", "0620-3.1-A41"]}, {"id": "0620-3.1-M17", "wrong": "a formula printed in the question can be rewritten from memory.", "correct": "copy the given formula exactly; it is the formula the mark scheme uses.", "atoms": ["0620-3.1-A36"]}, {"id": "0620-3.1-M18", "wrong": "a name or word equation answers a request for a formula or chemical equation.", "correct": "a formula needs symbols; a chemical equation means a balanced symbol equation.", "atoms": ["0620-3.1-A36", "0620-3.1-A37"]}]}
|
data/chapters/0620_ch05.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"id": "0620_ch05", "subject": "Chemistry", "code": "0620", "chapter": "Chemical calculations", "text": "Status: model-generated, unreviewed by a subject teacher. Generated 2 Oct 2026.\n\n# 0620 Chemistry — Chapter 5: Chemical calculations (syllabus 3.2 Relative masses, 3.3 The mole and the Avogadro constant)\n\nScope: syllabus section 3.2 (Core) and 3.3 (Core statement 1; Supplement statements 2–8). Section 3.1 (formulae and equations) is treated only as a prerequisite. Students sit Extended, so Supplement content is in scope. Numbered paragraphs [P1]… are the anchors the knowledge atoms point to. Stage-1 pipeline text; see ATOMS_PLAN.md.\n\n## A. The problem the chapter solves\n\n[P1] A balanced equation is a statement about *numbers of particles*: 2Mg + O₂ → 2MgO says two magnesium atoms react with one oxygen molecule. But nothing in a laboratory counts particles. A balance reads grams, a gas syringe reads cm³ of gas, a burette reads cm³ of solution. Every calculation in this chapter is one problem in disguise: convert a measurable quantity into a *count* of particles, use the equation's ratio, and convert the count back into something measurable. The chapter builds the tools for that conversion in the order they depend on one another: relative mass → the mole → three \"bridges\" (mass, gas volume, solution volume) → the reverse problems (formulae, yields, purity).\n\n## B. Relative mass: comparing instead of weighing\n\n[P2] A single atom is far too light to weigh (an oxygen atom has a mass of about 2.7 × 10⁻²³ g), so chemists compare atoms rather than weigh them. The **relative atomic mass, Ar**, of an element is the average mass of its atoms compared with 1/12 of the mass of one atom of carbon-12. Two features of that definition matter. First, it is *relative*, so Ar has no units: it is a ratio. Second, it is an *average over the isotopes* of the element as they occur naturally, which is why many Ar values are not whole numbers. Chlorine is 75% ³⁵Cl and 25% ³⁷Cl, so Ar(Cl) = (35 × 75 + 37 × 25) ÷ 100 = 35.5. In general Ar = Σ(isotope mass × % abundance) ÷ 100. The same relationship can be run backwards: if Ar(Cu) = 63.5 and the isotopes are ⁶³Cu and ⁶⁵Cu, then 63.5 lies a quarter of the way from 63 to 65, so the sample is 75% ⁶³Cu and 25% ⁶⁵Cu. An element whose Ar equals the nucleon number of one isotope (aluminium, 27) effectively has only that isotope. Carbon-12 is the reference because an isotope — not an element, whose Ar is itself an average — gives a fixed, exactly reproducible standard; setting it to exactly 12 keeps hydrogen at almost exactly 1.\n\n[P3] Once atoms have relative masses, so do molecules and formula units, because mass is additive: a molecule's mass is just the sum of its atoms' masses. The **relative molecular mass, Mr**, is the sum of the Ar values of all the atoms in the molecular formula: Mr(H₂O) = 2(1) + 16 = 18; Mr(CO₂) = 44. For an ionic compound there is no molecule, only a lattice, so the same sum over the formula unit is called the **relative formula mass**, still written Mr: Mr(NaCl) = 23 + 35.5 = 58.5; Mr(Ca(OH)₂) = 40 + 2(16 + 1) = 74. A bracket subscript multiplies everything inside the bracket; \"·5H₂O\" adds five waters (CuSO₄·5H₂O: 64 + 32 + 64 + 5 × 18 = 250). Like Ar, Mr has no units. Mr can also be inverted: if an unknown fragment R in a molecule of Mr 103 is left after subtracting the known atoms (29), R must be C₂H₅ (24 + 5). (Prerequisite from 3.1: reading a formula, including brackets.)\n\n## C. The mole: counting by weighing\n\n[P4] Here is the step that makes relative masses useful. Ar(Mg) = 24 and Ar(C) = 12 means one magnesium atom is twice as heavy as one carbon atom. Therefore 24 g of magnesium and 12 g of carbon contain *exactly the same number of atoms*: doubling the mass of each particle while doubling the total mass leaves the count unchanged. Generalising, \"Ar grams\" of any element — or \"Mr grams\" of any compound — always contains the same number of particles. That number has been measured: 6.02 × 10²³, the **Avogadro constant**. The amount of substance that contains 6.02 × 10²³ particles is **one mole (mol)**, and the mole is the unit of *amount of substance*. The particles may be atoms, molecules, ions or electrons, so a statement about moles must say which: one mole of oxygen *molecules* contains two moles of oxygen *atoms*. The mole exists for the same reason a \"dozen\" or a \"ream\" exists: it lets us count enormous numbers of identical objects by weighing them.\n\n[P5] The mass of one mole is the **molar mass**, in g/mol, and it is numerically equal to Ar or Mr: the molar mass of water is 18 g/mol. This gives the first bridge between the balance and the particle count:\n\namount of substance (mol) = mass (g) ÷ molar mass (g/mol), n = m ÷ M.\n\nThe same relationship rearranged gives mass (m = n × M) and molar mass (M = m ÷ n). The third form is how an unknown element or compound is identified from an experiment: if 0.0200 mol of a metal weighs 0.480 g, M = 24 g/mol and the metal is magnesium. The reasoning never changes; only which of the three quantities is unknown changes.\n\n[P6] The number of particles follows directly: number = n × 6.02 × 10²³. Two habits avoid the common slips. State the particle: 0.5 mol of H₂O contains 3.01 × 10²³ molecules but 9.03 × 10²³ atoms; 2 mol of MgCl₂ contains 4 mol = 2.41 × 10²⁴ chloride ions. Keep the chain explicit: mass → moles (÷ M) → particles (× L), or in reverse particles → moles (÷ L) → mass (× M). Answers are expected in standard form with the coefficient between 1 and 10.\n\n## D. Equations as recipes\n\n[P7] Before the mole, reacting masses can be handled by *simple proportion* (Core, 3.2.3). Multiply each coefficient by its Mr to turn the equation into a mass statement: 2Mg + O₂ → 2MgO becomes 48 g + 32 g → 80 g. Mass is conserved (48 + 32 = 80), which is a useful check. Any other quantity is found by scaling: 12 g of Mg is a quarter of 48 g, so it gives a quarter of 80 g = 20 g of MgO. This works because the mass ratio of substances in a reaction is fixed by the equation and never changes with the amount used.\n\n[P8] With the mole the same idea becomes general and handles gases and solutions too. The coefficients in a balanced equation are *mole ratios*, because moles are just a fixed number of particles each: 2Mg + O₂ → 2MgO means 2 mol Mg : 1 mol O₂ : 2 mol MgO. Every reacting-quantity problem then has three steps: (1) convert the given quantity to moles using whichever bridge fits (mass ÷ M; gas volume ÷ 24; concentration × volume); (2) multiply by the ratio of coefficients (wanted ÷ given); (3) convert the moles of the wanted substance back using its bridge. Examiners print these three steps as bullet points in most Paper 4 calculations; the middle step is where most errors live, because it is the only one that depends on reading the equation. (Prerequisite from 3.1: a correctly balanced equation.)\n\n[P9] If the amounts of *two* reactants are given, one of them will run out first and stop the reaction: it is the **limiting reactant**; the other is in **excess**. To find it, convert both to moles and compare with the equation's ratio — for example by dividing each amount by its coefficient; the smaller result is limiting. The amount of product is fixed by the limiting reactant only, so the theoretical yield must be calculated from it. Equal moles do not mean neither is limiting: 0.20 mol Al and 0.20 mol I₂ in 2Al + 3I₂ → 2AlI₃ leaves aluminium in excess. In the laboratory, excess of a solid reactant shows itself as solid left undissolved and effervescence stopping; questions phrased as \"which is the limiting reactant? explain\" expect the moles of each, the ratio, and the conclusion.\n\n## E. The gas bridge\n\n[P10] In a gas the molecules are far apart, so the volume a gas occupies depends on how many molecules there are and on temperature and pressure — not on which gas it is. Equal volumes of any gases at the same temperature and pressure therefore contain equal numbers of molecules (Avogadro's law). It follows that one mole of *any* gas occupies the same volume under the same conditions: the **molar gas volume**, taken as 24 dm³ (24 000 cm³) at room temperature and pressure (r.t.p.). So moles of gas = volume (dm³) ÷ 24, or volume (cm³) ÷ 24 000, and volume = moles × 24 dm³. Because volume is proportional to moles, gases reacting with gases do so in volumes in the ratio of the coefficients, with no conversion needed. A gas's density at r.t.p. is Mr ÷ 24 g/dm³, which is another way to find Mr. Note the two things that are *not* true: 24 dm³ is not the volume of one mole of a liquid or solid, and the figure changes with temperature and pressure.\n\n## F. The solution bridge\n\n[P11] **Concentration** is the amount of solute in one cubic decimetre (1 dm³ = 1000 cm³ = 1 litre) of solution. It can be expressed in g/dm³ or in mol/dm³, and the two are linked by the molar mass: g/dm³ = mol/dm³ × Mr. Volumes are nearly always measured in cm³, so divide by 1000 before using them: moles = concentration (mol/dm³) × volume (dm³). The same relation gives the other two unknowns: concentration = moles ÷ volume (dm³), volume (dm³) = moles ÷ concentration. A sanity check: titration-scale amounts come out around 10⁻³ mol; an answer of 2.5 mol from 25 cm³ of 0.1 mol/dm³ acid signals a forgotten ÷ 1000.\n\n[P12] A **titration** measures the volume of one solution needed to react exactly with a measured volume of another, with an indicator to show the end-point. It is the solution bridge applied to a neutralisation: moles of the known solution = c × V; use the equation ratio (2NaOH : 1H₂SO₄ halves it; 2HNO₃ : 1Ca(OH)₂ doubles it); then the unknown's concentration = moles ÷ its volume in dm³, or the volume needed = moles ÷ its concentration. When the answer is wanted in g/dm³, multiply the mol/dm³ answer by the solute's Mr as a final step. If a sample was dissolved and made up to 250 cm³ and only 25.0 cm³ portions were titrated, the moles found refer to the portion and must be scaled by ten to recover the whole sample. (Technique — burette, pipette, concordant titres, choice of indicator — belongs to the practical sections and is only assumed here.)\n\n## G. Running the bridge backwards: formulae\n\n[P13] An **empirical formula** is the simplest whole-number ratio of atoms (or ions) in a compound (3.1.5). Composition data — masses of each element, or percentages, which are just masses in 100 g — give it by the mole bridge applied to each element separately: moles of atoms = mass ÷ Ar. Since moles of atoms are proportional to numbers of atoms, the mole ratio *is* the atom ratio. Divide every value by the smallest to get the ratio to 1, then clear fractions by multiplying through (×2 for .5; ×3 for .33 or .67; ×4 for .25 or .75) rather than rounding them away: C 50.0%, H 5.56%, O 44.4% gives 4.17 : 5.56 : 2.78 = 1.5 : 2 : 1 = 3 : 4 : 2, so C₃H₄O₂. Combustion data work the same way once the carbon is traced to CO₂ (moles C = moles CO₂) and the hydrogen to H₂O (moles H = 2 × moles H₂O), oxygen being found by difference.\n\n[P14] The **molecular formula** gives the actual number of atoms in one molecule (3.1.2) and is a whole-number multiple of the empirical formula. The multiple is Mr ÷ (empirical-formula mass): CH₂ with Mr 70 is 70 ÷ 14 = 5, so C₅H₁₀; CHO with Mr 116 is 116 ÷ 29 = 4, so C₄H₄O₄. A molecular formula can also be read off a displayed structure and reduced to its empirical formula by dividing the subscripts by their highest common factor (C₄H₈O₂ → C₂H₄O). The formula of a hydrated salt, MSO₄·xH₂O, is the same idea with water as one of the \"elements\": heat to constant mass, convert the anhydrous residue to moles (m ÷ Mr), convert the mass lost to moles of water (÷ 18), and x = moles of water ÷ moles of salt. Heating to *constant mass* is what guarantees all the water has gone.\n\n## H. Percentages: composition, yield, purity\n\n[P15] **Percentage composition by mass** of an element in a compound is the part of the Mr that element contributes: % = (number of atoms × Ar) ÷ Mr × 100. For Fe₂O₃: Mr = 160; iron contributes 112; 70.0%. For nitrogen in (NH₄)₂SO₄: 28 ÷ 132 × 100 = 21.2%. The denominator is always the whole formula's Mr, including water of crystallisation if the formula has it.\n\n[P16] Real experiments give less product than the equation predicts. **Percentage yield** = actual mass obtained ÷ theoretical mass × 100, where the theoretical mass is calculated by the mole method from the limiting reactant. Yields fall short because reactions may be reversible or incomplete, side reactions consume reactant, and product is lost in transfers, filtering and purification. **Percentage purity** = mass of the pure substance ÷ mass of the impure sample × 100; the pure mass is usually not weighed directly but inferred from how much product the sample made (for example, the CO₂ released by an impure carbonate), again by the mole method, assuming the impurities do not react. The two percentages are easily confused: yield compares what was *made* with what *should* have been made; purity compares what *is really there* with what was *weighed out*.\n\n## I. Conventions and bridges to other chapters\n\n[P17] Mark schemes for this chapter follow fixed conventions. Working is credited step by step (M1, M2…), and an error carried forward (ecf) from one step into the next is not penalised twice, so always write the intermediate moles. Correct final answers earn full marks even without working unless \"show your working\" is stated. Give answers to three significant figures unless the data or the question say otherwise (\"to one decimal place\" for Ar); do not round intermediate values. Ar and Mr have no units; masses need g, volumes need the stated cm³ or dm³, concentrations need mol/dm³ or g/dm³ — a missing or wrong unit usually costs the final mark unless the unit is pre-printed on the answer line. Standard-form answers should have a coefficient between 1 and 10. Use the Ar values from the Periodic Table supplied (Cl 35.5, Cu 64, Fe 56, Zn 65, Ag 108) unless the question gives an Mr.\n\n[P18] Bridges. The same \"per mole\" idea underlies enthalpy changes and bond energies (kJ/mol, section 6), where the quantity of substance in the equation as written fixes the energy; the rate of diffusion of a gas depends on its Mr (section 1); electrolysis quantities (section 4) rest on moles of electrons; and the \"excess reagent\" steps of salt preparation (section 7) are the limiting-reactant idea made qualitative. Recognising the mole in those places is what makes them one subject rather than four.\n\n## Coverage matrix\n\n| Syllabus statement | Wording (abridged, official) | Tier | Paragraphs |\n|---|---|---|---|\n| 3.2.1 | Describe Ar as the average mass of the isotopes of an element compared to 1/12th of the mass of an atom of ¹²C | Core | P2 |\n| 3.2.2 | Define Mr as the sum of the relative atomic masses; relative formula mass used for ionic compounds | Core | P3 |\n| 3.2.3 | Calculate reacting masses in simple proportions, without the mole concept | Core | P7 |\n| 3.3.1 | State that concentration can be measured in g/dm³ or mol/dm³ | Core | P11 |\n| 3.3.2 | State that the mole is the unit of amount of substance; one mole contains 6.02 × 10²³ particles (Avogadro constant) | Supplement | P4, P6 |\n| 3.3.3 | Use amount = mass ÷ molar mass to calculate (a) amount, (b) mass, (c) molar mass, (d) Ar or Mr, (e) number of particles | Supplement | P5, P6 |\n| 3.3.4 | Use the molar gas volume, 24 dm³ at r.t.p., in calculations involving gases | Supplement | P10 |\n| 3.3.5 | Calculate stoichiometric reacting masses, limiting reactants, gas volumes at r.t.p., solution volumes and concentrations in g/dm³ and mol/dm³, including cm³ ↔ dm³ | Supplement | P8, P9, P10, P11 |\n| 3.3.6 | Use titration data to calculate moles of solute, or concentration or volume of a solution | Supplement | P12 |\n| 3.3.7 | Calculate empirical formulae and molecular formulae, given appropriate data | Supplement | P13, P14 |\n| 3.3.8 | Calculate percentage yield, percentage composition by mass and percentage purity | Supplement | P15, P16 |\n| 3.1.2 (prerequisite) | Define molecular formula | Core | P14 |\n| 3.1.5 (prerequisite) | Define empirical formula | Supplement | P13, P14 |\n| 3.1.4 / 3.1.7 (prerequisite) | Construct balanced symbol equations | Core / Supp | P8 (assumed) |\n| — bridge, no statement | Why the chapter exists: particles vs measurable quantities | — | P1 |\n| — bridge, no statement | Mark-scheme conventions (sig figs, units, ecf, standard form) | — | P17 |\n| — bridge, no statement | Links to enthalpy (6), diffusion (1), electrolysis (4), salt preparation (7) | — | P18 |\n\nGaps: none of 3.2.x / 3.3.x lacks a paragraph. Scope notes: the isotope-abundance calculation (P2) is examined every session under 3.2.1 although the statement says \"describe\"; the water-of-crystallisation determination (P14) is examined under 3.3.7 although the statement names only empirical and molecular formulae. Not covered on purpose: back-titration and gas density (mentioned once in P10) are beyond what the archive shows being examined.\n", "atoms": [{"id": "0620-3.2-A01", "type": "fact", "statement": "Relative atomic mass, Ar, is the average mass of the isotopes of an element compared with 1/12 of the mass of one atom of carbon-12.", "why": "Atoms cannot be weighed singly, so a comparison standard is needed.", "prerequisites": [], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.2-A02", "type": "concept", "statement": "Relative masses are ratios, so Ar and Mr have no units.", "why": "A ratio of two masses cancels the unit.", "prerequisites": ["0620-3.2-A01"], "tier": "core", "paragraphs": "P2; P3"}, {"id": "0620-3.2-A03", "type": "fact", "statement": "The reference isotope is carbon-12, taken as exactly 12.", "why": "An isotope has one fixed mass; an element (an isotope mixture) does not, so only an isotope can be a standard.", "prerequisites": ["0620-3.2-A01"], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.2-A04", "type": "concept", "statement": "Ar values are usually not whole numbers because they are weighted averages over the natural isotopes.", "why": "Each isotope has a near-integer mass, but the mixture averages between them.", "prerequisites": ["0620-3.2-A01"], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.2-A05", "type": "procedure", "statement": "Calculate Ar from isotope masses and % abundances: Ar = sum(mass x abundance) / 100 (or / total ratio parts).", "why": "Weighted mean; abundances are the weights.", "prerequisites": ["0620-3.2-A04"], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.2-A06", "type": "procedure", "statement": "Find the abundance of an isotope (or identify the missing isotope) from Ar and the isotope masses.", "why": "Inverting the weighted mean: Ar lies between the two masses at a point fixed by the abundance.", "prerequisites": ["0620-3.2-A05"], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.2-A07", "type": "relationship", "statement": "If Ar equals the nucleon number of one isotope, the element effectively has only that isotope.", "why": "A weighted mean equals one value only when that value has 100% weight.", "prerequisites": ["0620-3.2-A04"], "tier": "core", "paragraphs": "P2"}, {"id": "0620-3.2-A08", "type": "fact", "statement": "Relative molecular mass, Mr, is the sum of the Ar of the atoms in the formula; for ionic compounds the same sum is called relative formula mass, also written Mr.", "why": "Ionic compounds have no molecules, only a lattice ratio.", "prerequisites": ["0620-3.2-A01"], "tier": "core", "paragraphs": "P3"}, {"id": "0620-3.2-A09", "type": "procedure", "statement": "Compute Mr for any formula, multiplying through brackets and adding water of crystallisation.", "why": "Mass is additive: a bracket subscript multiplies everything inside; .xH2O adds x waters.", "prerequisites": ["0620-3.2-A08"], "tier": "core", "paragraphs": "P3"}, {"id": "0620-3.2-A10", "type": "concept", "statement": "Relative masses add because mass is conserved when atoms combine.", "why": "The molecule is nothing more than its atoms.", "prerequisites": ["0620-3.2-A01"], "tier": "core", "paragraphs": "P3"}, {"id": "0620-3.2-A11", "type": "procedure", "statement": "Invert Mr: subtract the known atoms from a given Mr to find a missing fragment or an unknown Ar.", "why": "Additivity runs both ways.", "prerequisites": ["0620-3.2-A09"], "tier": "supplement", "paragraphs": "P3"}, {"id": "0620-3.2-A12", "type": "procedure", "statement": "Reacting masses by simple proportion: coefficient x Mr gives the mass of each substance; scale to the given mass.", "why": "The mass ratio in a reaction is fixed by the equation and independent of amount.", "prerequisites": ["0620-3.2-A09"], "tier": "core", "paragraphs": "P7"}, {"id": "0620-3.2-A13", "type": "concept", "statement": "Total mass of reactants equals total mass of products; use it as a check on a mass statement.", "why": "Atoms are rearranged, not created or destroyed.", "prerequisites": ["0620-3.2-A12"], "tier": "core", "paragraphs": "P7"}, {"id": "0620-3.3-A14", "type": "fact", "statement": "The mole (mol) is the unit of amount of substance; one mole contains 6.02 x 10^23 particles, the Avogadro constant.", "why": "A fixed count lets amounts be compared as numbers of particles.", "prerequisites": [], "tier": "supplement", "paragraphs": "P4"}, {"id": "0620-3.3-A15", "type": "concept", "statement": "Ar grams of any element (Mr grams of any compound) contain the same number of particles, so weighing is counting.", "why": "If particle A is k times heavier than B, k times the mass of A holds the same count as the mass of B.", "prerequisites": ["0620-3.2-A01", "0620-3.3-A14"], "tier": "supplement", "paragraphs": "P4"}, {"id": "0620-3.3-A16", "type": "concept", "statement": "A mole statement must name the particle: atoms, molecules, ions or electrons.", "why": "One mole of O2 molecules is two moles of O atoms; the count depends on what is counted.", "prerequisites": ["0620-3.3-A14"], "tier": "supplement", "paragraphs": "P4; P6"}, {"id": "0620-3.3-A17", "type": "fact", "statement": "Molar mass (g/mol) is numerically equal to Ar or Mr.", "why": "One mole is Ar (or Mr) grams by construction.", "prerequisites": ["0620-3.3-A14", "0620-3.2-A09"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0620-3.3-A18", "type": "relationship", "statement": "amount (mol) = mass (g) / molar mass (g/mol); rearranged: mass = n x M, M = m / n.", "why": "Follows from the definition of molar mass.", "prerequisites": ["0620-3.3-A17"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0620-3.3-A19", "type": "procedure", "statement": "Find the molar mass, Ar or Mr of an unknown from a measured mass and amount, then identify the substance.", "why": "M = m / n; compare with the Periodic Table.", "prerequisites": ["0620-3.3-A18"], "tier": "supplement", "paragraphs": "P5"}, {"id": "0620-3.3-A20", "type": "procedure", "statement": "Number of particles = amount (mol) x 6.02 x 10^23; and amount = number / 6.02 x 10^23.", "why": "Scaling the Avogadro count.", "prerequisites": ["0620-3.3-A14", "0620-3.3-A18"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0620-3.3-A21", "type": "procedure", "statement": "Particles inside particles: multiply moles of molecules or formula units by the subscript to get moles of a given atom or ion.", "why": "Each molecule carries a fixed number of each atom.", "prerequisites": ["0620-3.3-A16", "0620-3.3-A20"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0620-3.3-A22", "type": "concept", "statement": "The coefficients of a balanced equation are mole ratios.", "why": "Moles are a fixed count each, so particle ratios are mole ratios.", "prerequisites": ["0620-3.3-A14"], "tier": "supplement", "paragraphs": "P8"}, {"id": "0620-3.3-A23", "type": "procedure", "statement": "Three-step mole method: convert the given quantity to moles, apply the coefficient ratio (wanted / given), convert the wanted moles back.", "why": "Every bridge (mass, gas, solution) meets at moles.", "prerequisites": ["0620-3.3-A22", "0620-3.3-A18"], "tier": "supplement", "paragraphs": "P8"}, {"id": "0620-3.3-A24", "type": "fact", "statement": "The limiting reactant is the one used up first; the other is in excess; the product is fixed by the limiting reactant.", "why": "Reaction stops when any reactant runs out.", "prerequisites": ["0620-3.3-A22"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0620-3.3-A25", "type": "procedure", "statement": "Identify the limiting reactant: convert both reactants to moles and compare with the equation ratio (e.g. moles / coefficient; smaller is limiting).", "why": "Direct comparison of available vs required amounts.", "prerequisites": ["0620-3.3-A24", "0620-3.3-A23"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0620-3.3-A26", "type": "relationship", "statement": "Theoretical product (and hence % yield) must be calculated from the limiting reactant, never from the one in excess.", "why": "Excess reactant is left over; it cannot make more product.", "prerequisites": ["0620-3.3-A25"], "tier": "supplement", "paragraphs": "P9; P16"}, {"id": "0620-3.3-A27", "type": "technique", "statement": "Excess of a solid reactant is shown by solid remaining undissolved and effervescence stopping.", "why": "Qualitative face of the limiting-reactant idea (salt preparation, 7.x).", "prerequisites": ["0620-3.3-A24"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0620-3.3-A28", "type": "concept", "statement": "Equal volumes of gases at the same temperature and pressure contain equal numbers of molecules, because gas volume depends on particle number and conditions, not identity.", "why": "Gas molecules are far apart; the molecules themselves take negligible space.", "prerequisites": ["0620-3.3-A14"], "tier": "supplement", "paragraphs": "P10"}, {"id": "0620-3.3-A29", "type": "fact", "statement": "The molar gas volume is 24 dm3 (24 000 cm3) for any gas at room temperature and pressure (r.t.p.).", "why": "Consequence of A28 at one fixed set of conditions.", "prerequisites": ["0620-3.3-A28"], "tier": "supplement", "paragraphs": "P10"}, {"id": "0620-3.3-A30", "type": "procedure", "statement": "Gas bridge: moles = volume (dm3) / 24 or volume (cm3) / 24 000; volume = moles x 24 dm3.", "why": "Scaling the molar volume.", "prerequisites": ["0620-3.3-A29"], "tier": "supplement", "paragraphs": "P10"}, {"id": "0620-3.3-A31", "type": "relationship", "statement": "For gases reacting with gases, volumes are in the same ratio as the coefficients (same conditions).", "why": "Volume is proportional to moles for gases.", "prerequisites": ["0620-3.3-A28", "0620-3.3-A22"], "tier": "supplement", "paragraphs": "P10"}, {"id": "0620-3.3-A33", "type": "fact", "statement": "Concentration is the amount of solute per dm3 of solution, in g/dm3 or mol/dm3; 1 dm3 = 1000 cm3.", "why": "Standardising to one volume makes solutions comparable.", "prerequisites": [], "tier": "core", "paragraphs": "P11"}, {"id": "0620-3.3-A34", "type": "relationship", "statement": "concentration in g/dm3 = concentration in mol/dm3 x Mr (and the reverse).", "why": "Each mole weighs Mr grams.", "prerequisites": ["0620-3.3-A33", "0620-3.3-A17"], "tier": "supplement", "paragraphs": "P11"}, {"id": "0620-3.3-A35", "type": "procedure", "statement": "Convert cm3 to dm3 by dividing by 1000 before using a volume with a concentration.", "why": "Concentration is defined per dm3.", "prerequisites": ["0620-3.3-A33"], "tier": "supplement", "paragraphs": "P11"}, {"id": "0620-3.3-A36", "type": "relationship", "statement": "moles = concentration (mol/dm3) x volume (dm3); concentration = moles / volume; volume = moles / concentration.", "why": "Follows from the definition of concentration.", "prerequisites": ["0620-3.3-A35"], "tier": "supplement", "paragraphs": "P11"}, {"id": "0620-3.3-A37", "type": "procedure", "statement": "Titration calculation: moles of the known solution = c x V; apply the equation ratio; then unknown concentration = n / V or required volume = n / c.", "why": "The solution bridge applied twice across a neutralisation equation.", "prerequisites": ["0620-3.3-A36", "0620-3.3-A23"], "tier": "supplement", "paragraphs": "P12"}, {"id": "0620-3.3-A38", "type": "procedure", "statement": "When the answer is wanted in g/dm3, finish a titration chain by multiplying the mol/dm3 result by the Mr of the solute.", "why": "Unit conversion as a final step.", "prerequisites": ["0620-3.3-A37", "0620-3.3-A34"], "tier": "supplement", "paragraphs": "P12"}, {"id": "0620-3.3-A39", "type": "procedure", "statement": "Scale titration results from a 25.0 cm3 portion back to the whole 250 cm3 solution (x10) when a sample was made up to volume.", "why": "Moles found refer to the portion titrated.", "prerequisites": ["0620-3.3-A37"], "tier": "supplement", "paragraphs": "P12"}, {"id": "0620-3.3-A40", "type": "technique", "statement": "A titration measures the volume of one solution (burette) needed to react exactly with a measured volume of another (pipette), using an indicator to show the end-point.", "why": "Volumes are the measurable quantity; the equation turns them into amounts.", "prerequisites": ["0620-3.3-A33"], "tier": "supplement", "paragraphs": "P12"}, {"id": "0620-3.3-A41", "type": "fact", "statement": "The empirical formula is the simplest whole-number ratio of the atoms (or ions) in a compound.", "why": "Ratio, not count.", "prerequisites": [], "tier": "supplement", "paragraphs": "P13"}, {"id": "0620-3.3-A42", "type": "procedure", "statement": "Empirical formula from composition: mass (or %) of each element / Ar -> divide by the smallest -> clear fractions -> write the formula.", "why": "Moles of atoms are proportional to numbers of atoms.", "prerequisites": ["0620-3.3-A41", "0620-3.3-A18"], "tier": "supplement", "paragraphs": "P13"}, {"id": "0620-3.3-A43", "type": "concept", "statement": "Dividing each mass by Ar converts to moles of atoms, and mole ratio = atom ratio because every mole is the same count.", "why": "The mole bridge applied to each element separately.", "prerequisites": ["0620-3.3-A15", "0620-3.3-A42"], "tier": "supplement", "paragraphs": "P13"}, {"id": "0620-3.3-A44", "type": "procedure", "statement": "Clear a fractional ratio by multiplying through (x2 for .5, x3 for .33/.67, x4 for .25/.75); never round 1.5 to 2.", "why": "Rounding changes the formula; multiplying keeps the ratio.", "prerequisites": ["0620-3.3-A42"], "tier": "supplement", "paragraphs": "P13"}, {"id": "0620-3.3-A45", "type": "procedure", "statement": "Empirical formula from combustion data: moles C = moles CO2; moles H = 2 x moles H2O; oxygen by difference.", "why": "Tracing each element to the product that carries it.", "prerequisites": ["0620-3.3-A42", "0620-3.3-A21"], "tier": "supplement", "paragraphs": "P13"}, {"id": "0620-3.3-A46", "type": "fact", "statement": "The molecular formula is the actual number of atoms of each element in one molecule; it is a whole-number multiple of the empirical formula.", "why": "Molecules have a definite size; a ratio does not.", "prerequisites": ["0620-3.3-A41"], "tier": "supplement", "paragraphs": "P14"}, {"id": "0620-3.3-A47", "type": "procedure", "statement": "Molecular formula from empirical formula and Mr: multiplier = Mr / (empirical formula mass); multiply the subscripts.", "why": "The molecule's mass is n times the unit's mass.", "prerequisites": ["0620-3.3-A46", "0620-3.2-A09"], "tier": "supplement", "paragraphs": "P14"}, {"id": "0620-3.3-A48", "type": "procedure", "statement": "Empirical formula from a molecular formula or structure: count the atoms, divide subscripts by their highest common factor.", "why": "Reduction to simplest ratio.", "prerequisites": ["0620-3.3-A41"], "tier": "supplement", "paragraphs": "P14"}, {"id": "0620-3.3-A49", "type": "procedure", "statement": "Read the molecular formula off a displayed or structural formula or a systematic name.", "why": "Counting atoms in a drawing.", "prerequisites": ["0620-3.3-A46"], "tier": "core", "paragraphs": "P14"}, {"id": "0620-3.3-A50", "type": "procedure", "statement": "Water of crystallisation: moles of anhydrous salt = residue mass / Mr; moles of water = mass lost / 18; x = moles water / moles salt.", "why": "Hydrate formula is an empirical-formula problem with water as a unit.", "prerequisites": ["0620-3.3-A42", "0620-3.3-A18"], "tier": "supplement", "paragraphs": "P14"}, {"id": "0620-3.3-A51", "type": "technique", "statement": "Heat the hydrate to constant mass (heat, cool, weigh, repeat) to be sure all the water has been removed.", "why": "Stopping early leaves water and makes x too small.", "prerequisites": ["0620-3.3-A50"], "tier": "supplement", "paragraphs": "P14"}, {"id": "0620-3.3-A52", "type": "procedure", "statement": "Percentage composition by mass of an element = (atoms x Ar) / Mr x 100.", "why": "The element's share of the formula mass.", "prerequisites": ["0620-3.2-A09"], "tier": "supplement", "paragraphs": "P15"}, {"id": "0620-3.3-A53", "type": "procedure", "statement": "Percentage yield = actual mass / theoretical mass x 100, with the theoretical mass found by the mole method from the limiting reactant.", "why": "Compares what was obtained with what the equation allows.", "prerequisites": ["0620-3.3-A23", "0620-3.3-A26"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0620-3.3-A54", "type": "concept", "statement": "Yields are below 100% because reactions may be reversible or incomplete, side reactions occur, and product is lost on transfer, filtering and purification.", "why": "Each cause removes product or reactant from the intended path.", "prerequisites": ["0620-3.3-A53"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0620-3.3-A55", "type": "procedure", "statement": "Percentage purity = mass of pure substance / mass of impure sample x 100, the pure mass being inferred from the product formed, assuming impurities do not react.", "why": "Compares what is really present with what was weighed out.", "prerequisites": ["0620-3.3-A23"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0620-3.3-A56", "type": "representation", "statement": "Paper 4 presents chains as 'Use the following steps' bullets with an answer line and unit for each step; each bullet is one mark.", "why": "Scaffolding fixes the method and makes ecf possible.", "prerequisites": ["0620-3.3-A23"], "tier": "supplement", "paragraphs": "P8; P17"}, {"id": "0620-3.3-A57", "type": "fact", "statement": "Mark-scheme conventions: answers to 3 s.f. unless told otherwise; Ar to 1 d.p. when asked; final mark lost for a missing/wrong unit unless the unit is printed; correct answer without working gets full marks unless 'show your working'; ecf applies between steps.", "why": "Published 'Calculation specific guidance' in every 0620 mark scheme.", "prerequisites": [], "tier": "supplement", "paragraphs": "P17"}, {"id": "0620-3.3-A58", "type": "concept", "statement": "The 'per mole' idea recurs in bond energies and enthalpy (kJ/mol), electrolysis (moles of electrons), diffusion rate (depends on Mr) and salt preparation (excess reagent).", "why": "Same bridge, different chapters.", "prerequisites": ["0620-3.3-A14"], "tier": "supplement", "paragraphs": "P18"}], "misconceptions": [{"id": "0620-3.3-A32", "wrong": "24 dm3 is the volume of one mole of anything, under any conditions.", "correct": "gases only, and only at r.t.p.", "atoms": ["0620-3.3-A28", "0620-3.3-A29"]}, {"id": "0620-3.3-M01", "wrong": "use a volume in cm3 directly with a concentration in mol/dm3.", "correct": "divide cm3 by 1000 first.", "atoms": ["0620-3.3-A35"]}, {"id": "0620-3.3-M02", "wrong": "moles of product = moles of reactant regardless of the equation.", "correct": "multiply by the coefficient ratio (wanted / given).", "atoms": ["0620-3.3-A22", "0620-3.3-A23"]}, {"id": "0620-3.3-M03", "wrong": "number of atoms = moles of molecules x L.", "correct": "multiply first by the number of that atom per molecule.", "atoms": ["0620-3.3-A16", "0620-3.3-A21"]}, {"id": "0620-3.3-M04", "wrong": "round an empirical ratio of 1.5 (or 1.33, 2.5) to the nearest integer.", "correct": "multiply through to clear the fraction.", "atoms": ["0620-3.3-A44"]}, {"id": "0620-3.3-M05", "wrong": "calculate theoretical yield from the reactant in excess, or confuse % yield with % purity.", "correct": "theoretical from the limiting reactant; yield = made / should have made; purity = really there / weighed out.", "atoms": ["0620-3.3-A26", "0620-3.3-A53", "0620-3.3-A55"]}, {"id": "0620-3.3-M06", "wrong": "Ar or Mr has units of grams, or Mr in grams is the mass of one molecule.", "correct": "Ar, Mr are unitless ratios; Mr grams is the mass of one mole (6.02 x 10^23 molecules).", "atoms": ["0620-3.2-A02", "0620-3.3-A15", "0620-3.3-A17"]}, {"id": "0620-3.3-M07", "wrong": "equal moles of two reactants means neither is limiting.", "correct": "compare with the equation ratio.", "atoms": ["0620-3.3-A25"]}, {"id": "0620-3.3-M08", "wrong": "use the hydrated (starting) mass to find moles of salt in a water-of-crystallisation problem.", "correct": "moles of salt come from the anhydrous residue; moles of water from the mass lost.", "atoms": ["0620-3.3-A50"]}, {"id": "0620-3.3-M09", "wrong": "24 dm3 = 24 cm3, or forget the cm3/dm3 factor when the answer line asks for cm3.", "correct": "24 dm3 = 24 000 cm3.", "atoms": ["0620-3.3-A29", "0620-3.3-A30"]}, {"id": "0620-3.2-M10", "wrong": "Ar is the simple average of the isotope masses, ignoring abundances.", "correct": "weight each isotope mass by its abundance, then divide by 100 (or the total ratio).", "atoms": ["0620-3.2-A05"]}, {"id": "0620-3.2-M11", "wrong": "an Ar can be rounded to a whole number or copied from the Periodic Table.", "correct": "Ar from abundances is a weighted mean, usually not whole; give it to the d.p. asked.", "atoms": ["0620-3.2-A04", "0620-3.3-A57"]}, {"id": "0620-3.2-M12", "wrong": "use the atomic (proton) number of an element in place of its Ar.", "correct": "Ar is the relative mass (roughly the nucleon number average); the proton number counts protons only.", "atoms": ["0620-3.2-A01", "0620-3.2-A09"]}, {"id": "0620-3.3-M13", "wrong": "in % by mass, count the element once even when the formula has several of its atoms.", "correct": "multiply Ar by the number of atoms of that element in the formula before dividing by Mr.", "atoms": ["0620-3.3-A52"]}, {"id": "0620-3.3-M14", "wrong": "the ratio of percentages (or masses) is the ratio of atoms in an empirical formula.", "correct": "divide each percentage by its Ar first to get moles of atoms, then divide by the smallest.", "atoms": ["0620-3.3-A42", "0620-3.3-A43"]}, {"id": "0620-3.3-M15", "wrong": "the molecular formula is the empirical formula.", "correct": "cancel the molecular formula by the highest common factor of the subscripts.", "atoms": ["0620-3.3-A48"]}, {"id": "0620-3.2-M16", "wrong": "apply the equation coefficients directly to masses (4 : 8 means mass doubles).", "correct": "coefficients are mole ratios; multiply each by its Mr to get the mass ratio.", "atoms": ["0620-3.2-A12", "0620-3.3-A23"]}, {"id": "0620-3.3-M17", "wrong": "the expected product can be found from the starting mass even when not all of it reacts.", "correct": "when reaction is incomplete, work from the product actually measured; theoretical vs actual gives % yield.", "atoms": ["0620-3.3-A53", "0620-3.3-A23"]}, {"id": "0620-3.3-M18", "wrong": "mass of a gas = moles x 24, or moles x Ar of one atom (O = 16).", "correct": "mass = moles x Mr of the molecule (O2 = 32); 24 dm3 converts moles to volume, not mass.", "atoms": ["0620-3.3-A18", "0620-3.3-A16"]}, {"id": "0620-3.3-M19", "wrong": "a fraction or an unevaluated sum is an acceptable final answer or Mr.", "correct": "evaluate every step to a decimal number (3 s.f.) with its unit.", "atoms": ["0620-3.3-A57"]}, {"id": "0620-3.2-M20", "wrong": "Ar equal to a nucleon number says nothing about isotopes (or equals Mr).", "correct": "a weighted mean equals one isotope mass only if that isotope is 100%: one isotope only.", "atoms": ["0620-3.2-A07"]}, {"id": "0620-3.3-M21", "wrong": "a titre depends on reaction rate, so warming the flask changes it.", "correct": "the titre depends only on the moles of solute in the flask; rate is irrelevant.", "atoms": ["0620-3.3-A37", "0620-3.3-A40"]}, {"id": "0620-3.3-M22", "wrong": "moles of a solute in solution = mass / Mr even when c and V are given.", "correct": "for a solution use n = c x V (V in dm3); Mr is needed only to convert to grams.", "atoms": ["0620-3.3-A36"]}]}
|
data/chapters/0625_ch03.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"id": "0625_ch03", "subject": "Physics", "code": "0625", "chapter": "Forces and motion", "text": "Status: model-generated, unreviewed by a subject teacher. Generated 2 Oct 2026.\n\n# 0625 Physics — Chapter 3: Forces and motion (syllabus 1.3 Mass and weight, 1.5.1 Effects of forces, 1.6 Momentum)\n\nScope: syllabus 1.3 (Core 1–4, Supplement 5), 1.5.1 (Core 1–8, Supplement 9–12) and 1.6 (Supplement 1–4). Students sit Extended, so Supplement content is in scope. Section 1.2 (motion) is used only where a force causes the motion; 1.1.7 (resultant of perpendicular vectors) only for forces. Moments (1.5.2), centre of gravity (1.5.3), density (1.4) and energy (1.7) are outside the chapter. Numbered paragraphs [P1]… are the anchors the knowledge atoms point to. Throughout, g = 9.8 N/kg, as on current papers. Stage-1 pipeline text; see ATOMS_PLAN.md.\n\n## A. The question the chapter answers\n\n[P1] What makes motion change? The everyday answer, \"things need a push to keep moving\", is wrong, and the chapter is built on replacing it. A puck slid across ice goes a long way; with no friction at all it would never stop. So motion itself needs no cause. What needs a cause is a *change* in motion: speeding up, slowing down or turning. That cause is a **force**, a push or pull measured in newtons (N). A force has a size and a direction, so it is a vector, and when several forces act, only their combined effect, the **resultant force**, decides what happens. The chapter builds the tools in dependency order: mass and weight → combining forces → F = ma → forces that oppose motion → falling and turning → springs → momentum.\n\n## B. Mass and weight\n\n[P2] **Mass** is a measure of the quantity of matter in an object (strictly, measured at rest relative to the observer). Its unit is the kilogram. Mass does not depend on where the object is: a 65 kg astronaut is 65 kg on Earth, on the Moon and in deep space. Squashing or reshaping an object leaves its mass unchanged: no matter is added or removed. Mass has a second role that the rest of the chapter uses: it is what resists a change in motion. A loaded trolley is harder to start and harder to stop than an empty one even on a frictionless track, where weight plays no part.\n\n[P3] **Weight** is the gravitational force on an object that has mass. Because it is a force, it is measured in newtons and has a direction (towards the centre of the Earth). The Supplement wording describes the cause: a mass creates a **gravitational field** around it, a region in which any other mass feels a force, and weight is the effect of that field on a mass. The strength of the field is defined as force per unit mass: **gravitational field strength** g = W ÷ m, in N/kg. Near the Earth's surface g = 9.8 N/kg; on the Moon about 1.6 N/kg; on Mars about 3.7 N/kg. So W = mg: the 65 kg astronaut weighs 65 × 9.8 = 637 N on Earth and 65 × 1.6 = 104 N on the Moon. The relationship runs both ways. An object that weighs 42 N on Earth has mass 42 ÷ 9.8 = 4.3 kg, so on Mars it weighs 4.3 × 3.7 = 16 N. The mass is the bridge between the two weights.\n\n[P4] Gravitational field strength has a second meaning. If weight is the only force on an object, the resultant force is mg, and from F = ma (P9) the acceleration is mg ÷ m = g. The mass cancels, so every object in free fall near the Earth accelerates at the same 9.8 m/s², whatever its mass. Hence g in N/kg *equals* the acceleration of free fall in m/s²; the units are equivalent (1 N/kg = 1 m/s²). On a planet with larger g, a dropped object falls a given height in less time.\n\n[P5] Weights and masses can be compared with a **balance**. A beam balance compares the weights of two objects at the same place; because both are multiplied by the same g, equal weights mean equal masses, and the balance gives the same result on the Moon as on Earth. A force meter (spring balance, newtonmeter) measures a single force, the weight, so it reads less on the Moon. Two blocks of identical size that give different force-meter readings have the same volume but different weights, and therefore different masses.\n\n## C. Combining forces\n\n[P6] Forces along one straight line combine by adding with signs. Choose a positive direction first, then add. A car with a 2000 N engine force forward, 800 N of air resistance and 500 N of friction backward has a resultant of 2000 − 800 − 500 = 700 N forward. If the forces cancel, the resultant is zero and the object is in **equilibrium**. Forces at right angles do not add like numbers: the resultant is the diagonal of the rectangle they form. A 0.90 N downward weight and a 1.6 N horizontal pull give √(0.90² + 1.6²) = 1.8 N at tan⁻¹(1.6 ÷ 0.90) = 61° to the vertical; a scale drawing gives the same result. (This is 1.1.7, used here only for forces.)\n\n[P7] **Newton's first law** follows from P1: an object stays at rest, or keeps moving in a straight line at constant speed, unless a resultant force acts on it. The converse is the part students miss: constant velocity does *not* mean no forces act. It means the forces balance. A cyclist riding at steady speed is still pedalling; friction and air resistance exactly match the driving force. An object rising through water at constant speed has an upward force equal to its weight plus the drag. Explaining constant speed therefore needs two things: name the opposing force, and state that it balances the forward force.\n\n[P8] A resultant force changes the **velocity** of an object, and velocity has two parts, so there are two kinds of change: the speed changes, or the direction of motion changes, or both. Forces can also change the **size and shape** of an object (stretching a spring, denting a car). A force cannot change an object's mass.\n\n## D. Force, mass and acceleration\n\n[P9] Experiments with trolleys show that, at fixed mass, the acceleration is proportional to the resultant force, and at fixed force, the acceleration is inversely proportional to the mass. Combining these and choosing the newton so that the constant is 1 gives **F = ma**: resultant force (N) = mass (kg) × acceleration (m/s²). One newton is the resultant force that gives 1 kg an acceleration of 1 m/s². The acceleration is always in the **same direction as the resultant force**, not necessarily the direction of motion: a braking car moves forward while its acceleration points backward. The F in F = ma is the resultant, never just the largest single force.\n\n[P10] Every \"forces to motion\" problem has the same chain: draw the forces → find the resultant (P6) → divide by the mass → use the acceleration on a speed–time graph. A 1200 kg car with 2600 N of driving force and 800 N of resistive force has a resultant of 1800 N, so a = 1800 ÷ 1200 = 1.5 m/s². Starting from rest, after 6.0 s its speed is 1.5 × 6.0 = 9.0 m/s, and the distance covered is the area under the straight speed–time line, ½ × 6.0 × 9.0 = 27 m. The chain also runs backwards: a speed change over a time gives a = Δv ÷ Δt, and then F = ma gives the force. Vertical problems need the weight in the resultant. A 0.40 kg mass hangs from a stretched spring that pulls up with 5.0 N; its weight is 0.40 × 9.8 = 3.92 N, so just after release the resultant is 5.0 − 3.92 = 1.08 N upward and a = 1.08 ÷ 0.40 = 2.7 m/s². Ignoring the weight, the commonest slip, gives 5.0 ÷ 0.40 = 13 m/s².\n\n[P11] F = ma also answers qualitative questions. The same force produces a bigger change of motion in a smaller mass. On a planet with twice Earth's g, an object's weight doubles, but a given horizontal force gives it the same horizontal acceleration as on Earth, because the mass has not changed. An opposing headwind reduces the resultant force on a train, so its acceleration is lower.\n\n## E. Forces that oppose motion\n\n[P12] **Solid friction** is the force between two surfaces in contact that may impede motion. It acts along the surfaces, opposite to the motion (or the attempted motion) of one surface relative to the other, and it produces heating: work done against friction ends up in the internal energy of the surfaces. Friction is not always the enemy of motion. A car's tyres need friction to accelerate, brake and turn; on a wet road friction is smaller, so the braking force is smaller and the braking distance longer. And friction's direction can surprise: a book on a table in a train that accelerates forward is carried forward by friction, because without it the book would slide back relative to the table.\n\n[P13] **Drag** is friction on an object moving through a fluid: drag in a liquid, and drag in a gas, called air resistance. Unlike solid friction, drag grows as speed grows (and with the area facing the flow), and it is zero when the object is at rest relative to the fluid. This is why a train's motors must supply more force than F = ma predicts from its acceleration: part of the motor force only balances friction and drag; the rest is the resultant.\n\n## F. Falling\n\n[P14] With no air resistance, the only force on a falling object is its weight, so the acceleration is g, constant, for every mass (P4). Its speed–time graph is a straight line through the origin with gradient 9.8 m/s². A steel ball dropped from a building falls with constant acceleration, not increasing acceleration.\n\n[P15] With air or liquid resistance, the motion has a fixed sequence, and full-mark answers follow it in order. (1) At release the speed is zero, so drag is zero and the only force is the weight: the object accelerates at g. (2) As the speed rises, drag rises. (3) The resultant force, weight − drag, falls, so the acceleration falls. (4) When drag equals weight the resultant is zero, the acceleration is zero and the object falls at constant speed: **terminal velocity**. The speed–time graph starts with gradient 9.8 m/s² and curves over to horizontal. Opening a parachute suddenly increases drag above weight; the resultant is now upward, so the parachutist *decelerates* while still moving down; drag falls as speed falls until it again equals weight at a new, lower terminal velocity. A ball released in oil follows the same pattern over a much shorter time. Terminal velocity also turns a force reading into a mass: if the upward drag on a capsule falling steadily under a parachute is 9.0 kN, its weight is 9.0 kN and its mass 9000 ÷ 9.8 = 920 kg.\n\n## G. Motion in a circle\n\n[P16] An object moving in a circle at constant speed is still accelerating, because the direction of its velocity keeps changing (P8). So a resultant force must act, and it acts **perpendicular to the motion, towards the centre** of the circle. The force does not speed the object up; it turns it. Friction between tyres and road supplies it for a car on a bend, tension for a ball on a string, gravity for a satellite in orbit. Three qualitative rules follow (the equation F = mv²/r is not required): with mass and radius fixed, a larger force means a higher speed; with mass and speed fixed, a larger force means a smaller radius (a tighter bend needs more force); with speed and radius fixed, a larger mass needs a larger force. A car slides off a circular track when the friction available is less than the force needed: too high a speed, a slippery surface, or a heavier load for the same grip.\n\n## H. Forces that change shape: springs\n\n[P17] Hang loads on a spring and it stretches. The **extension** is the new length minus the original (unloaded) length; it is extension, not length, that behaves simply. The experiment: clamp the spring beside a vertical metre rule, fix a pointer to its lower end, read the pointer at eye level with no load, add equal loads one at a time and read it again each time, subtract to get extensions, and check that the spring returns to its original length when unloaded. Plot load (y-axis) against extension (x-axis). A load–length graph does not pass through the origin, because an unloaded spring has length but no extension.\n\n[P18] For a spring, the load–extension graph is a straight line through the origin up to a point. In that region, extension is proportional to load, and the **spring constant** k = F ÷ x (force per unit extension, in N/m or N/cm) is the gradient. A spring 18.0 cm long under 1.5 N and 24.0 cm long under 4.5 N has k = (4.5 − 1.5) ÷ (24.0 − 18.0) = 0.50 N/cm, so its unstretched length is 18.0 − 1.5 ÷ 0.50 = 15.0 cm. A larger k means a stiffer spring: for the same load, the extension is smaller. The **limit of proportionality** is the point at which the graph stops being straight; beyond it, extension is no longer proportional to load and k = F ÷ x does not apply. A spring that is compressed has a negative extension, and the force needed points the opposite way.\n\n## I. Momentum\n\n[P19] F = ma can be rewritten. Acceleration is change in velocity per unit time, so F = m(v − u) ÷ t = (mv − mu) ÷ t. The quantity mv is so useful it gets a name: **momentum**, p = mv, in kg m/s. Momentum is a vector, in the direction of the velocity. The law then reads: the **resultant force equals the change in momentum per unit time**, F = Δp ÷ Δt. This form also handles a rocket losing exhaust gas or a ball whose velocity reverses.\n\n[P20] Multiplying through by the time gives **impulse**: impulse = FΔt = Δ(mv), force multiplied by the time for which it acts, in N s (the same unit as kg m/s). Direction is where marks are lost. A 0.060 kg ball hits a wall at 20 m/s and rebounds at 15 m/s. Taking the incoming direction as positive, Δp = 0.060 × (−15 − 20) = −2.1 kg m/s: the size is 2.1 N s, not the 0.30 N s that subtracting the speeds gives. If contact lasts 0.015 s, the average force is 2.1 ÷ 0.015 = 140 N. The same sign rule applies when only the final momentum is asked: an impulse opposite to the initial momentum first removes it, then builds momentum the other way.\n\n[P21] F = Δp ÷ Δt explains every safety design in the chapter. To stop a moving object, its momentum must change by a fixed amount, set by its mass and speed. Spreading that change over a longer time makes the force smaller. Crumple zones, airbags, seat belts that stretch, crash mats, rubber playground floors, bending the knees on landing and drawing the hands back while catching all work this way. The impulse (the momentum change) is *not* reduced; only the force is.\n\n[P22] When two objects interact (collide, push apart, or one throws something), they exert equal and opposite forces on each other for the same time, so they receive equal and opposite impulses and their momentum changes cancel. Hence **conservation of momentum**: if no external resultant force acts, the total momentum before an interaction equals the total momentum after. The method is fixed: choose a positive direction; write the total momentum before, with signs; write the total after; set them equal; solve; read the direction from the sign. A 1.2 kg trolley at 0.50 m/s hits a stationary 0.80 kg trolley and they join: 1.2 × 0.50 = 2.0v, so v = 0.30 m/s. Two railway wagons, 3000 kg at 4.0 m/s east and 2000 kg at 5.0 m/s west, couple: (12 000 − 10 000) ÷ 5000 = 0.40 m/s east. When a spring pushes a 2.0 kg trolley and a 0.50 kg trolley apart from rest, the total is zero before and after, so if the light one moves at 0.80 m/s one way, the heavy one moves at 0.20 m/s the other way. A balloon rocket moves forward because the air it pushes out carries equal momentum backward.\n\n## J. Conventions and bridges\n\n[P23] Mark schemes for this chapter follow fixed conventions. Use g = 9.8 N/kg. Give answers to two significant figures unless the data or the question say otherwise. Convert before substituting: g to kg, ms to s, kN to N, cm to m when k is wanted in N/m. Units: newton (N) for force (not kg m/s²), kg m/s or N s for momentum and impulse, N/m or N/cm for k. Vector answers need a direction. \"Show that\" items need the equation written in words or symbols, not just numbers. Definitions must be exact: acceleration is \"change in velocity per unit time\" or \"rate of change of velocity\", not both at once; impulse is \"force × time\", not \"force per unit time\"; the force is \"weight\" or \"gravitational force\", not \"gravity\"; drag increases \"as speed increases\", not \"with time\".\n\n[P24] Bridges. Speed–time graphs (1.2) turn F = ma into speeds and distances; friction and braking reappear as work done (1.7); weight is the force in pressure (1.8) and moments (1.5.2); gas pressure (2.1) is particles' momentum change per unit time per unit area; orbits (6.1) are circular motion with gravity as the central force.\n\n## Coverage matrix\n\n| Syllabus statement | Wording (abridged, official) | Tier | Paragraphs |\n|---|---|---|---|\n| 1.3.1 | Mass is a measure of the quantity of matter in an object at rest relative to the observer | Core | P2 |\n| 1.3.2 | Weight is a gravitational force on an object that has mass | Core | P3 |\n| 1.3.3 | Gravitational field strength is force per unit mass; g = W/m; equivalent to the acceleration of free fall | Core | P3, P4 |\n| 1.3.4 | Weights (and masses) may be compared using a balance | Core | P5 |\n| 1.3.5 | Describe and use weight as the effect of a gravitational field on a mass | Supplement | P3 |\n| 1.5.1.1 | Forces may produce changes in the size and shape of an object | Core | P8, P17 |\n| 1.5.1.2 | Sketch, plot and interpret load–extension graphs; describe the experimental procedure | Core | P17, P18 |\n| 1.5.1.3 | Determine the resultant of two or more forces acting along the same straight line | Core | P6 |\n| 1.5.1.4 | An object remains at rest or moves in a straight line at constant speed unless acted on by a resultant force | Core | P1, P7 |\n| 1.5.1.5 | A resultant force may change the velocity of an object by changing its direction or its speed | Core | P8, P16 |\n| 1.5.1.6 | Solid friction impedes motion and produces heating | Core | P12 |\n| 1.5.1.7 | Friction (drag) acts on an object moving through a liquid | Core | P13, P15 |\n| 1.5.1.8 | Friction (drag) acts on an object moving through a gas (air resistance) | Core | P13, P15 |\n| 1.5.1.9 | Spring constant k = F/x | Supplement | P18 |\n| 1.5.1.10 | Define and use the limit of proportionality; identify it on a load–extension graph | Supplement | P18 |\n| 1.5.1.11 | F = ma; force and acceleration in the same direction | Supplement | P9, P10, P11 |\n| 1.5.1.12 | Circular motion due to a perpendicular force: (a) speed, (b) radius, (c) mass relationships | Supplement | P16 |\n| 1.6.1 | Momentum p = mv | Supplement | P19 |\n| 1.6.2 | Impulse = FΔt = Δ(mv) | Supplement | P20, P21 |\n| 1.6.3 | Conservation of momentum in one dimension | Supplement | P22 |\n| 1.6.4 | Resultant force = change in momentum per unit time, F = Δp/Δt | Supplement | P19, P20, P21 |\n| 1.2.13 (border) | Falling with and without air/liquid resistance; terminal velocity | Supplement | P14, P15 |\n| 1.2.9–1.2.11 (border) | a = Δv/Δt; speed–time graph gradient and area, used where a force causes the motion | Core / Supp | P10 |\n| 1.1.7 (border) | Resultant of two vectors at right angles, forces only | Supplement | P6 |\n| — bridge, no statement | Why a change of motion, not motion, needs a cause | — | P1 |\n| — bridge, no statement | Mark-scheme conventions (g, s.f., units, definitions, directions) | — | P23 |\n| — bridge, no statement | Links to 1.2, 1.5.2, 1.7, 1.8, 2.1, 6.1 | — | P24 |\n\nGaps: none of 1.3.x, 1.5.1.x or 1.6.x lacks a paragraph. Scope notes: the free-fall and terminal-velocity statement sits formally in 1.2 (1.2.13) but every archived item on it is a forces explanation, so it is treated as part of this chapter. Coursebook placement: the Cambridge coursebook may put springs and load–extension (1.5.1.1–2, 9–10) in a later chapter (\"Forces and matter\"); they are included here because the brief maps all of 1.5.1 to chapter 3. Not covered on purpose: F = mv²/r, elastic limit, equations of uniformly accelerated motion beyond Δv = aΔt and area under a graph.\n", "atoms": [{"id": "0625-1.3-A01", "type": "fact", "statement": "Mass is a measure of the quantity of matter in an object; unit kg.", "why": "Counting matter needs no reference to place or force.", "prerequisites": [], "tier": "core", "paragraphs": "P2"}, {"id": "0625-1.3-A02", "type": "concept", "statement": "Mass does not change with location, shape, compression or heating.", "why": "No matter is added or removed.", "prerequisites": ["0625-1.3-A01"], "tier": "core", "paragraphs": "P2"}, {"id": "0625-1.3-A03", "type": "concept", "statement": "Mass is also what resists a change in motion: the same force gives a smaller acceleration to a larger mass.", "why": "a = F/m.", "prerequisites": ["0625-1.3-A01"], "tier": "core", "paragraphs": "P2; P11"}, {"id": "0625-1.3-A04", "type": "fact", "statement": "Weight is the gravitational force on an object that has mass; it is a force, in newtons, directed towards the centre of the Earth.", "why": "Gravity acts on mass.", "prerequisites": ["0625-1.3-A01", "0625-1.5-A01"], "tier": "core", "paragraphs": "P3"}, {"id": "0625-1.3-A05", "type": "concept", "statement": "A gravitational field is a region in which a mass experiences a force; weight is the effect of a gravitational field on a mass.", "why": "Field = force per unit of the property it acts on.", "prerequisites": ["0625-1.3-A04"], "tier": "supplement", "paragraphs": "P3"}, {"id": "0625-1.3-A06", "type": "fact", "statement": "Gravitational field strength is force per unit mass: g = W/m, unit N/kg.", "why": "Definition of a field strength.", "prerequisites": ["0625-1.3-A05"], "tier": "core", "paragraphs": "P3"}, {"id": "0625-1.3-A07", "type": "fact", "statement": "g = 9.8 N/kg near the Earth's surface; other bodies have different values (Moon about 1.6, Mars about 3.7 N/kg), given in questions.", "why": "Depends on the mass and size of the body.", "prerequisites": ["0625-1.3-A06"], "tier": "core", "paragraphs": "P3"}, {"id": "0625-1.3-A08", "type": "procedure", "statement": "Calculate weight: W = mg (mass in kg).", "why": "Definition of g rearranged.", "prerequisites": ["0625-1.3-A06", "0625-1.3-A07"], "tier": "core", "paragraphs": "P3"}, {"id": "0625-1.3-A09", "type": "procedure", "statement": "Inverse and chained weight problems: m = W/g, then W' = m g' at another place.", "why": "Mass is the invariant that links two weights.", "prerequisites": ["0625-1.3-A08", "0625-1.3-A02"], "tier": "core", "paragraphs": "P3"}, {"id": "0625-1.3-A10", "type": "relationship", "statement": "For a fixed mass, weight is proportional to g: a larger g gives a larger weight, while mass stays the same.", "why": "W = mg with m constant.", "prerequisites": ["0625-1.3-A08", "0625-1.3-A02"], "tier": "core", "paragraphs": "P3"}, {"id": "0625-1.3-A11", "type": "concept", "statement": "g is equal to the acceleration of free fall: with weight the only force, a = mg/m = g for every mass; 1 N/kg = 1 m/s². A larger g means faster falling.", "why": "Mass cancels in a = W/m.", "prerequisites": ["0625-1.3-A06", "0625-1.5-A08"], "tier": "core", "paragraphs": "P4"}, {"id": "0625-1.3-A12", "type": "technique", "statement": "A balance compares weights at the same place and hence masses (same reading on the Moon); a force meter measures one weight (reads less on the Moon).", "why": "Both sides share the same g on a beam balance.", "prerequisites": ["0625-1.3-A10"], "tier": "core", "paragraphs": "P5"}, {"id": "0625-1.3-A13", "type": "procedure", "statement": "When a supporting force balances the weight (terminal velocity, hanging load, maximum lift), weight = that force, so m = F/g.", "why": "Zero resultant means the forces are equal.", "prerequisites": ["0625-1.3-A09", "0625-1.5-A05"], "tier": "core", "paragraphs": "P3; P15"}, {"id": "0625-1.5-A01", "type": "fact", "statement": "A force is a push or pull measured in newtons; it is a vector (size and direction).", "why": "Its effect depends on direction.", "prerequisites": [], "tier": "core", "paragraphs": "P1"}, {"id": "0625-1.5-A02", "type": "procedure", "statement": "Resultant of forces along a line: choose a positive direction, add with signs, state the direction; zero resultant = equilibrium.", "why": "Opposite forces cancel.", "prerequisites": ["0625-1.5-A01"], "tier": "core", "paragraphs": "P6"}, {"id": "0625-1.5-A03", "type": "procedure", "statement": "Resultant of two perpendicular forces: magnitude by Pythagoras, angle by tan, or a scale drawing from tail to tip; quote the angle from the stated reference.", "why": "Perpendicular components are independent.", "prerequisites": ["0625-1.5-A01"], "tier": "supplement", "paragraphs": "P6"}, {"id": "0625-1.5-A04", "type": "concept", "statement": "Newton's first law: with no resultant force an object stays at rest or moves in a straight line at constant speed.", "why": "Only a resultant force changes velocity.", "prerequisites": ["0625-1.5-A02"], "tier": "core", "paragraphs": "P1; P7"}, {"id": "0625-1.5-A05", "type": "relationship", "statement": "Constant velocity means the forces are balanced, not absent; an explanation names the opposing force and says it balances the forward force.", "why": "Zero resultant, not zero forces.", "prerequisites": ["0625-1.5-A04"], "tier": "core", "paragraphs": "P7"}, {"id": "0625-1.5-A06", "type": "fact", "statement": "A resultant force changes velocity: it changes the speed, the direction of motion, or both.", "why": "Velocity has size and direction.", "prerequisites": ["0625-1.5-A04"], "tier": "core", "paragraphs": "P8"}, {"id": "0625-1.5-A07", "type": "fact", "statement": "Forces can change the size and shape of an object; they cannot change its mass.", "why": "Deformation moves matter, does not create it.", "prerequisites": ["0625-1.5-A01"], "tier": "core", "paragraphs": "P8; P17"}, {"id": "0625-1.5-A08", "type": "relationship", "statement": "F = ma: acceleration is proportional to resultant force and inversely proportional to mass; 1 N gives 1 kg an acceleration of 1 m/s².", "why": "Definition of the newton from experiment.", "prerequisites": ["0625-1.5-A02", "0625-1.3-A03"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0625-1.5-A09", "type": "fact", "statement": "The acceleration is in the same direction as the resultant force, not necessarily the direction of motion.", "why": "F = ma is a vector equation.", "prerequisites": ["0625-1.5-A08"], "tier": "supplement", "paragraphs": "P9"}, {"id": "0625-1.5-A10", "type": "procedure", "statement": "Forces-to-motion method: draw the forces, find the resultant (including weight for vertical motion), then a = F/m.", "why": "Only the resultant accelerates the mass.", "prerequisites": ["0625-1.5-A02", "0625-1.5-A08", "0625-1.3-A08"], "tier": "supplement", "paragraphs": "P10"}, {"id": "0625-1.5-A11", "type": "procedure", "statement": "Chain F = ma with a = Δv/Δt and the speed-time graph (gradient = a, area = distance), in either direction.", "why": "Acceleration links forces to motion graphs.", "prerequisites": ["0625-1.5-A08"], "tier": "supplement", "paragraphs": "P10"}, {"id": "0625-1.5-A12", "type": "representation", "statement": "Speed-time graph: gradient is acceleration (tangent on a curve); zero gradient = zero acceleration; falling gradient = decreasing acceleration; negative gradient = deceleration.", "why": "Gradient = Δv/Δt.", "prerequisites": ["0625-1.5-A11"], "tier": "supplement", "paragraphs": "P10; P15"}, {"id": "0625-1.5-A13", "type": "relationship", "statement": "Qualitatively, the same force changes the motion of a smaller mass more; an extra opposing force lowers the resultant and the acceleration.", "why": "a = F/m.", "prerequisites": ["0625-1.5-A08"], "tier": "supplement", "paragraphs": "P11"}, {"id": "0625-1.5-A14", "type": "fact", "statement": "Solid friction acts between surfaces in contact, opposes their relative (or attempted) motion and produces heating.", "why": "Surfaces interlock; work against friction raises internal energy.", "prerequisites": ["0625-1.5-A01"], "tier": "core", "paragraphs": "P12"}, {"id": "0625-1.5-A15", "type": "concept", "statement": "Friction provides grip for driving, braking and turning; less friction (wet road) means a longer braking distance; friction can push an object forward (book on an accelerating train).", "why": "Friction opposes relative motion of the surfaces, not motion in general.", "prerequisites": ["0625-1.5-A14"], "tier": "core", "paragraphs": "P12"}, {"id": "0625-1.5-A16", "type": "fact", "statement": "Drag is friction on an object moving through a liquid or a gas (air resistance); it opposes the motion.", "why": "Fluid must be pushed aside.", "prerequisites": ["0625-1.5-A14"], "tier": "core", "paragraphs": "P13"}, {"id": "0625-1.5-A17", "type": "relationship", "statement": "Drag increases as speed increases (and with frontal area) and is zero at rest.", "why": "Faster motion pushes more fluid aside each second.", "prerequisites": ["0625-1.5-A16"], "tier": "core", "paragraphs": "P13"}, {"id": "0625-1.5-A18", "type": "concept", "statement": "A driving force must exceed ma: part of it only balances friction and drag; the rest is the resultant.", "why": "Resultant = driving - resistive.", "prerequisites": ["0625-1.5-A10", "0625-1.5-A16"], "tier": "supplement", "paragraphs": "P13"}, {"id": "0625-1.5-A19", "type": "relationship", "statement": "Falling with no air resistance: the only force is weight, so the acceleration is constant at g for every mass; the speed-time graph is straight.", "why": "a = W/m = g.", "prerequisites": ["0625-1.3-A11"], "tier": "supplement", "paragraphs": "P14"}, {"id": "0625-1.5-A20", "type": "procedure", "statement": "Falling with drag, in order: at release drag is zero so a = g; drag rises with speed; resultant (weight - drag) and acceleration fall; when drag = weight, resultant is zero and velocity is constant (terminal velocity).", "why": "Each step follows from F = ma.", "prerequisites": ["0625-1.5-A17", "0625-1.5-A08", "0625-1.5-A19"], "tier": "supplement", "paragraphs": "P15"}, {"id": "0625-1.5-A21", "type": "fact", "statement": "At terminal velocity drag equals weight, the resultant force is zero and the acceleration is zero.", "why": "Balanced forces mean constant velocity.", "prerequisites": ["0625-1.5-A20", "0625-1.5-A05"], "tier": "supplement", "paragraphs": "P15"}, {"id": "0625-1.5-A22", "type": "representation", "statement": "Speed-time graph of a fall with drag: initial gradient 9.8 m/s², gradient decreasing smoothly to zero, then horizontal.", "why": "Gradient = acceleration, which falls to zero.", "prerequisites": ["0625-1.5-A20", "0625-1.5-A12"], "tier": "supplement", "paragraphs": "P15"}, {"id": "0625-1.5-A23", "type": "relationship", "statement": "Opening a parachute makes drag exceed weight: the resultant is upward, the object decelerates, drag falls with speed, and a lower terminal velocity is reached.", "why": "Resultant opposite to motion gives deceleration.", "prerequisites": ["0625-1.5-A20"], "tier": "supplement", "paragraphs": "P15"}, {"id": "0625-1.5-A24", "type": "concept", "statement": "Motion in a circle at constant speed is accelerated motion because the direction of velocity changes, so a resultant force must act.", "why": "Velocity is a vector.", "prerequisites": ["0625-1.5-A06", "0625-1.5-A04"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0625-1.5-A25", "type": "fact", "statement": "The resultant force on an object moving in a circle is perpendicular to its motion, towards the centre; friction, tension or gravity supplies it.", "why": "A force along the motion would change the speed.", "prerequisites": ["0625-1.5-A24"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0625-1.5-A26", "type": "relationship", "statement": "Circular motion, qualitatively: larger force -> higher speed (m, r fixed); larger force -> smaller radius (m, v fixed); larger mass needs larger force (v, r fixed); too little friction -> the object slides off.", "why": "Stated syllabus relationships (F = mv²/r not required).", "prerequisites": ["0625-1.5-A25"], "tier": "supplement", "paragraphs": "P16"}, {"id": "0625-1.5-A27", "type": "fact", "statement": "Extension = loaded length - original length; it is extension, not length, that is proportional to load.", "why": "An unloaded spring has length but no extension.", "prerequisites": ["0625-1.5-A07"], "tier": "core", "paragraphs": "P17"}, {"id": "0625-1.5-A28", "type": "technique", "statement": "Load-extension experiment: clamp spring by a vertical rule, pointer at eye level, add known loads one at a time, record length, subtract original length, check return on unloading, plot load against extension.", "why": "Fair, repeatable measurement of extension.", "prerequisites": ["0625-1.5-A27"], "tier": "core", "paragraphs": "P17"}, {"id": "0625-1.5-A29", "type": "representation", "statement": "Load-extension graph: straight line through the origin up to the limit of proportionality, then curving; a load-length graph does not pass through the origin.", "why": "Proportionality region.", "prerequisites": ["0625-1.5-A27"], "tier": "core", "paragraphs": "P17; P18"}, {"id": "0625-1.5-A30", "type": "fact", "statement": "Spring constant k = F/x, force per unit extension, in N/m or N/cm; it is the gradient of the straight part of the load-extension graph.", "why": "Definition.", "prerequisites": ["0625-1.5-A29"], "tier": "supplement", "paragraphs": "P18"}, {"id": "0625-1.5-A31", "type": "procedure", "statement": "Use k: from two load-length points (difference of loads over difference of lengths), x = F/k, original length from one point, negative extension for compression.", "why": "Linear relation within the limit.", "prerequisites": ["0625-1.5-A30"], "tier": "supplement", "paragraphs": "P18"}, {"id": "0625-1.5-A32", "type": "relationship", "statement": "A larger spring constant means a stiffer spring: smaller extension for the same load.", "why": "x = F/k.", "prerequisites": ["0625-1.5-A30"], "tier": "supplement", "paragraphs": "P18"}, {"id": "0625-1.5-A33", "type": "fact", "statement": "The limit of proportionality is the point beyond which extension is no longer proportional to load (the graph stops being straight); k = F/x applies only below it.", "why": "Definition.", "prerequisites": ["0625-1.5-A29"], "tier": "supplement", "paragraphs": "P18"}, {"id": "0625-1.6-A01", "type": "fact", "statement": "Momentum p = mv (mass x velocity), unit kg m/s; it is a vector in the direction of the velocity.", "why": "Definition.", "prerequisites": ["0625-1.5-A06"], "tier": "supplement", "paragraphs": "P19"}, {"id": "0625-1.6-A02", "type": "concept", "statement": "F = ma rewritten: F = m(v - u)/t = (mv - mu)/t, so resultant force = change in momentum per unit time.", "why": "a = Δv/Δt.", "prerequisites": ["0625-1.5-A08", "0625-1.6-A01"], "tier": "supplement", "paragraphs": "P19"}, {"id": "0625-1.6-A03", "type": "fact", "statement": "Resultant force F = Δp/Δt (change in momentum per unit time).", "why": "Definition of resultant force in momentum form.", "prerequisites": ["0625-1.6-A02"], "tier": "supplement", "paragraphs": "P19"}, {"id": "0625-1.6-A04", "type": "fact", "statement": "Impulse = force x time for which it acts = change in momentum: FΔt = Δ(mv); unit N s (= kg m/s).", "why": "Multiply F = Δp/Δt by Δt.", "prerequisites": ["0625-1.6-A03"], "tier": "supplement", "paragraphs": "P20"}, {"id": "0625-1.6-A05", "type": "procedure", "statement": "Change of momentum with direction: fix a positive direction, Δp = m(v - u) with signs; on a rebound the speeds add; a reverse impulse first cancels the initial momentum.", "why": "Momentum is a vector.", "prerequisites": ["0625-1.6-A01", "0625-1.6-A04"], "tier": "supplement", "paragraphs": "P20"}, {"id": "0625-1.6-A06", "type": "procedure", "statement": "Force from a momentum change: F = Δp/Δt, converting ms to s; or initial velocity from FΔt/m.", "why": "Rearranged definition.", "prerequisites": ["0625-1.6-A03", "0625-1.6-A05"], "tier": "supplement", "paragraphs": "P20"}, {"id": "0625-1.6-A07", "type": "relationship", "statement": "For a fixed change in momentum, a longer contact time gives a smaller force; the impulse itself is not reduced (airbags, crumple zones, bending knees, moving hands back, soft floors).", "why": "F = Δp/Δt with Δp fixed.", "prerequisites": ["0625-1.6-A03"], "tier": "supplement", "paragraphs": "P21"}, {"id": "0625-1.6-A08", "type": "concept", "statement": "In an interaction the two objects receive equal and opposite impulses, so with no external resultant force the total momentum is conserved.", "why": "Equal and opposite forces for the same time.", "prerequisites": ["0625-1.6-A04"], "tier": "supplement", "paragraphs": "P22"}, {"id": "0625-1.6-A09", "type": "procedure", "statement": "Conservation method: positive direction; total momentum before (with signs) = total after; solve for the unknown velocity or mass; the sign gives the direction.", "why": "Conservation law.", "prerequisites": ["0625-1.6-A08", "0625-1.6-A05"], "tier": "supplement", "paragraphs": "P22"}, {"id": "0625-1.6-A10", "type": "procedure", "statement": "Explosions and recoil from rest: total momentum stays zero, so the parts move apart with equal and opposite momenta.", "why": "Zero before means zero after.", "prerequisites": ["0625-1.6-A09"], "tier": "supplement", "paragraphs": "P22"}], "misconceptions": [{"id": "0625-1.3-M01", "wrong": "Weight is the quantity of matter in an object; mass is a force.", "correct": "Mass is quantity of matter (kg); weight is the gravitational force on it (N).", "atoms": ["0625-1.3-A01", "0625-1.3-A04"]}, {"id": "0625-1.3-M02", "wrong": "Weight = mass / g.", "correct": "W = mg; mass = W/g.", "atoms": ["0625-1.3-A08"]}, {"id": "0625-1.3-M03", "wrong": "The force that makes things fall is called 'gravity'.", "correct": "The force is weight, or the gravitational force.", "atoms": ["0625-1.3-A04"]}, {"id": "0625-1.3-M04", "wrong": "A mass in kg can be used where a force is needed.", "correct": "Convert mass to weight with W = mg before using it as a force.", "atoms": ["0625-1.3-A08"]}, {"id": "0625-1.5-M01", "wrong": "Moving at constant speed needs a resultant force forward (driving force bigger than friction).", "correct": "Constant velocity means balanced forces: friction equals the driving force.", "atoms": ["0625-1.5-A04", "0625-1.5-A05"]}, {"id": "0625-1.5-M02", "wrong": "An object that is still accelerating as it falls has balanced forces.", "correct": "Forces balance only at terminal velocity; before that weight exceeds drag.", "atoms": ["0625-1.5-A20", "0625-1.5-A21"]}, {"id": "0625-1.5-M03", "wrong": "A vehicle moves in the direction opposite to the friction force on objects in it.", "correct": "Friction opposes relative motion of the surfaces; it can carry an object forward with an accelerating floor.", "atoms": ["0625-1.5-A15"]}, {"id": "0625-1.5-M04", "wrong": "In vertical F = ma problems the weight can be ignored.", "correct": "Include weight in the resultant: resultant = upward force - weight.", "atoms": ["0625-1.5-A10"]}, {"id": "0625-1.5-M05", "wrong": "Air resistance increases with time.", "correct": "Air resistance increases as speed increases.", "atoms": ["0625-1.5-A17"]}, {"id": "0625-1.5-M06", "wrong": "At terminal velocity air resistance balances the acceleration (or acceleration equals resistance).", "correct": "Air resistance balances the weight; the acceleration is then zero.", "atoms": ["0625-1.5-A21"]}, {"id": "0625-1.5-M07", "wrong": "An object falling with no air resistance has increasing acceleration.", "correct": "Acceleration is constant at g; the speed increases.", "atoms": ["0625-1.5-A19"]}, {"id": "0625-1.5-M08", "wrong": "An object moving in a circle at constant speed needs no resultant force, or the force points outward / along the motion.", "correct": "Velocity changes direction, so a resultant force acts towards the centre.", "atoms": ["0625-1.5-A24", "0625-1.5-A25"]}, {"id": "0625-1.5-M09", "wrong": "Spring constant = load / length.", "correct": "k = load / extension; subtract the original length first.", "atoms": ["0625-1.5-A27", "0625-1.5-A31"]}, {"id": "0625-1.5-M10", "wrong": "Two perpendicular forces (or velocities) combine by adding or subtracting their sizes.", "correct": "Use Pythagoras and tan, or a scale vector diagram drawn tail to tip.", "atoms": ["0625-1.5-A03"]}, {"id": "0625-1.5-M11", "wrong": "Acceleration is 'the rate of change of velocity per unit time'; deceleration is 'decreasing acceleration'.", "correct": "Acceleration = change in velocity per unit time OR rate of change of velocity; deceleration = negative acceleration.", "atoms": ["0625-1.5-A12"]}, {"id": "0625-1.6-M01", "wrong": "Change in momentum = mass x (difference of speeds), even when the direction reverses.", "correct": "With a reversal the velocities have opposite signs, so the speeds add.", "atoms": ["0625-1.6-A05"]}, {"id": "0625-1.6-M02", "wrong": "The momentum itself is the change in momentum (or the final momentum after an impulse equals the impulse).", "correct": "Δp = p(final) - p(initial); find each with its sign.", "atoms": ["0625-1.6-A05"]}, {"id": "0625-1.6-M03", "wrong": "Impulse is force per unit time, or the rate of change of momentum.", "correct": "Impulse = force x time = change in momentum; rate of change of momentum is force.", "atoms": ["0625-1.6-A04", "0625-1.6-A03"]}, {"id": "0625-1.6-M04", "wrong": "Soft floors, airbags and crumple zones reduce the impulse or the change in momentum.", "correct": "The momentum change is fixed; the longer time reduces the force.", "atoms": ["0625-1.6-A07"]}, {"id": "0625-1.6-M05", "wrong": "Momenta of objects moving towards each other add.", "correct": "Give one a negative sign; the total is the difference.", "atoms": ["0625-1.6-A09"]}, {"id": "0625-1.6-M06", "wrong": "Force from a momentum change is F = mv, or F = kinetic energy / time.", "correct": "F = Δ(mv)/Δt.", "atoms": ["0625-1.6-A06"]}, {"id": "0625-1.6-M07", "wrong": "Objects pushed apart from rest move off together, as if they had collided and stuck.", "correct": "Total momentum is zero: they move in opposite directions with equal-size momenta.", "atoms": ["0625-1.6-A10"]}, {"id": "0625-1.6-M08", "wrong": "Momentum and moment are the same idea.", "correct": "Momentum = mass x velocity; moment = force x perpendicular distance.", "atoms": ["0625-1.6-A01"]}]}
|
requirements.txt
CHANGED
|
@@ -2,3 +2,4 @@ fastapi==0.115.*
|
|
| 2 |
uvicorn[standard]==0.32.*
|
| 3 |
huggingface_hub>=0.26
|
| 4 |
pydantic>=2
|
|
|
|
|
|
| 2 |
uvicorn[standard]==0.32.*
|
| 3 |
huggingface_hub>=0.26
|
| 4 |
pydantic>=2
|
| 5 |
+
anthropic>=1.0,<2
|
static/index.html
CHANGED
|
@@ -183,6 +183,27 @@ td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-
|
|
| 183 |
}
|
| 184 |
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font: 600 0.95rem var(--font-display); z-index: 9; }
|
| 185 |
.empty { display: grid; gap: 8px; padding: 8px 0; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
@media (prefers-reduced-motion: no-preference) {
|
| 187 |
.set-card, .student { transition: border-color 120ms ease, background-color 120ms ease; }
|
| 188 |
}
|
|
@@ -196,6 +217,7 @@ td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-
|
|
| 196 |
<div class="brand"><h1>StepWise Self-Checks</h1><span class="tag">IGCSE · Oct 2026</span></div>
|
| 197 |
<nav class="tabs" aria-label="Sections">
|
| 198 |
<button id="tab-practise" aria-pressed="true">Practise</button>
|
|
|
|
| 199 |
<button id="tab-progress" aria-pressed="false">Progress</button>
|
| 200 |
</nav>
|
| 201 |
<div class="who"><button id="who" class="who-chip">Choose your name</button></div>
|
|
@@ -336,6 +358,7 @@ td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-
|
|
| 336 |
S.attempts = st.attempts;
|
| 337 |
if (S.studentId && !S.students.has(S.studentId)) S.studentId = null;
|
| 338 |
S.dbError = ""; S.pinError = "";
|
|
|
|
| 339 |
} catch (e) {
|
| 340 |
if (e.status === 401 || e.status === 503) { S.pinError = e.message; S.pin = ""; store.del("sw.pin"); }
|
| 341 |
else S.dbError = "unavailable";
|
|
@@ -449,7 +472,8 @@ td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-
|
|
| 449 |
|
| 450 |
// ---------- rendering ----------
|
| 451 |
function render() {
|
| 452 |
-
$("tab-practise").setAttribute("aria-pressed", String(
|
|
|
|
| 453 |
$("tab-progress").setAttribute("aria-pressed", String(S.view === "progress"));
|
| 454 |
const who = $("who"); const st = S.studentId && S.students.get(S.studentId);
|
| 455 |
who.textContent = st ? st.name : "Choose your name"; who.classList.toggle("set", !!st);
|
|
@@ -463,8 +487,161 @@ td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-
|
|
| 463 |
if (S.view === "test" && S.run) return renderTest(main, dock, dockRow);
|
| 464 |
if (S.view === "review" && S.run) return renderReview(main, dock, dockRow);
|
| 465 |
if (S.view === "progress") return renderProgress(main);
|
|
|
|
| 466 |
renderPractise(main);
|
| 467 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 468 |
function connectionNotice() {
|
| 469 |
return h("div", { class: "notice bad" }, h("p", { text: "The results store isn't answering. Check the internet connection and reload the page." }));
|
| 470 |
}
|
|
@@ -713,18 +890,13 @@ td.num, th.num { text-align: right; font-family: var(--font-data); font-variant-
|
|
| 713 |
}
|
| 714 |
main.append(hs);
|
| 715 |
|
| 716 |
-
|
| 717 |
-
main.append(h("section", { class: "sheet" }, h("h2", { text: "Download results" }),
|
| 718 |
-
h("p", { class: "muted", text: "Spreadsheet files (CSV) for all students. They open in Excel or Google Sheets." }),
|
| 719 |
-
h("div", { class: "students" },
|
| 720 |
-
h("a", { class: "btn ghost", href: `/api/export/attempts.csv?pin=${pinQ}`, text: "Attempts" }),
|
| 721 |
-
h("a", { class: "btn ghost", href: `/api/export/answers.csv?pin=${pinQ}`, text: "Every answer" }),
|
| 722 |
-
h("a", { class: "btn ghost", href: `/api/export/atoms.csv?pin=${pinQ}`, text: "Ideas by student" }))));
|
| 723 |
}
|
| 724 |
|
| 725 |
// ---------- chrome ----------
|
| 726 |
$("tab-practise").addEventListener("click", () => { if (S.view === "test" && !confirmLeave()) return; S.view = "practise"; S.run = null; render(); });
|
| 727 |
$("tab-progress").addEventListener("click", () => { if (S.view === "test" && !confirmLeave()) return; S.view = "progress"; S.run = null; render(); });
|
|
|
|
| 728 |
$("who").addEventListener("click", () => { if (S.view === "test") return toast("Submit or leave the self-check first"); S.view = "practise"; S.picking = true; render(); });
|
| 729 |
function confirmLeave() { saveDraft(); toast("Your answers are kept on this device. Open the self-check again to carry on."); clearInterval(timerHandle); return true; }
|
| 730 |
|
|
|
|
| 183 |
}
|
| 184 |
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font: 600 0.95rem var(--font-display); z-index: 9; }
|
| 185 |
.empty { display: grid; gap: 8px; padding: 8px 0; }
|
| 186 |
+
|
| 187 |
+
/* tutor */
|
| 188 |
+
.lv-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; border: 1px solid var(--rule); background: var(--paper); }
|
| 189 |
+
.lv { display: block; height: 100%; }
|
| 190 |
+
.lv0 { background: var(--rule); } .lv1 { background: var(--bad); } .lv2 { background: var(--warn); }
|
| 191 |
+
.lv3 { background: var(--accent); } .lv4 { background: var(--good); }
|
| 192 |
+
.lv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
|
| 193 |
+
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: var(--ink-soft); }
|
| 194 |
+
.set-card .students { gap: 8px; }
|
| 195 |
+
.chat { gap: 12px; }
|
| 196 |
+
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 12px; display: grid; gap: 6px; min-width: 0; }
|
| 197 |
+
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
|
| 198 |
+
.bubble.tutor { background: var(--paper); border: 1px solid var(--rule); justify-self: start; border-top-left-radius: 4px; }
|
| 199 |
+
.bubble.me { background: var(--accent-wash); justify-self: end; border-top-right-radius: 4px; }
|
| 200 |
+
.bubble.system { background: var(--bad-wash); justify-self: center; }
|
| 201 |
+
.chat.log { display: grid; gap: 10px; padding: 12px; background: var(--paper); border-radius: var(--radius); }
|
| 202 |
+
.chat-row { width: 100%; }
|
| 203 |
+
.composer { display: grid; gap: 8px; width: 100%; }
|
| 204 |
+
.composer textarea { min-height: 56px; }
|
| 205 |
+
.composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
|
| 206 |
+
.composer-row .selfmark { margin-right: auto; }
|
| 207 |
@media (prefers-reduced-motion: no-preference) {
|
| 208 |
.set-card, .student { transition: border-color 120ms ease, background-color 120ms ease; }
|
| 209 |
}
|
|
|
|
| 217 |
<div class="brand"><h1>StepWise Self-Checks</h1><span class="tag">IGCSE · Oct 2026</span></div>
|
| 218 |
<nav class="tabs" aria-label="Sections">
|
| 219 |
<button id="tab-practise" aria-pressed="true">Practise</button>
|
| 220 |
+
<button id="tab-tutor" aria-pressed="false">Tutor</button>
|
| 221 |
<button id="tab-progress" aria-pressed="false">Progress</button>
|
| 222 |
</nav>
|
| 223 |
<div class="who"><button id="who" class="who-chip">Choose your name</button></div>
|
|
|
|
| 358 |
S.attempts = st.attempts;
|
| 359 |
if (S.studentId && !S.students.has(S.studentId)) S.studentId = null;
|
| 360 |
S.dbError = ""; S.pinError = "";
|
| 361 |
+
try { S.tutorOn = (await api("/api/tutor/status")).enabled; } catch { S.tutorOn = false; }
|
| 362 |
} catch (e) {
|
| 363 |
if (e.status === 401 || e.status === 503) { S.pinError = e.message; S.pin = ""; store.del("sw.pin"); }
|
| 364 |
else S.dbError = "unavailable";
|
|
|
|
| 472 |
|
| 473 |
// ---------- rendering ----------
|
| 474 |
function render() {
|
| 475 |
+
$("tab-practise").setAttribute("aria-pressed", String(!["progress", "tutor"].includes(S.view)));
|
| 476 |
+
$("tab-tutor").setAttribute("aria-pressed", String(S.view === "tutor"));
|
| 477 |
$("tab-progress").setAttribute("aria-pressed", String(S.view === "progress"));
|
| 478 |
const who = $("who"); const st = S.studentId && S.students.get(S.studentId);
|
| 479 |
who.textContent = st ? st.name : "Choose your name"; who.classList.toggle("set", !!st);
|
|
|
|
| 487 |
if (S.view === "test" && S.run) return renderTest(main, dock, dockRow);
|
| 488 |
if (S.view === "review" && S.run) return renderReview(main, dock, dockRow);
|
| 489 |
if (S.view === "progress") return renderProgress(main);
|
| 490 |
+
if (S.view === "tutor") return renderTutor(main, dock, dockRow);
|
| 491 |
renderPractise(main);
|
| 492 |
}
|
| 493 |
+
|
| 494 |
+
// ---------- tutor ----------
|
| 495 |
+
const T = { setId: null, sessionId: null, mode: null, msgs: [], busy: false, conf: null, mastery: null, draft: "" };
|
| 496 |
+
async function loadMastery() {
|
| 497 |
+
if (!S.studentId || T.loadingM) return;
|
| 498 |
+
T.loadingM = true;
|
| 499 |
+
try { T.mastery = await api(`/api/mastery/${encodeURIComponent(S.studentId)}`); } catch { T.mastery = {}; }
|
| 500 |
+
T.loadingM = false;
|
| 501 |
+
if (S.view === "tutor" && !T.sessionId) render();
|
| 502 |
+
}
|
| 503 |
+
async function tutorStart(setId, mode) {
|
| 504 |
+
T.setId = setId; T.mode = mode; T.msgs = []; T.busy = true; T.sessionId = null; render();
|
| 505 |
+
try {
|
| 506 |
+
const r = await api("/api/tutor/start", { method: "POST", body: JSON.stringify({ studentId: S.studentId, setId, mode }) });
|
| 507 |
+
T.sessionId = r.sessionId; T.msgs.push({ who: "tutor", text: r.reply });
|
| 508 |
+
} catch (e) { toast(e.message); T.setId = null; }
|
| 509 |
+
T.busy = false; render(); scrollChat();
|
| 510 |
+
}
|
| 511 |
+
async function tutorSend() {
|
| 512 |
+
const box = $("tutor-input"); const text = (box ? box.value : T.draft).trim();
|
| 513 |
+
if (!text || T.busy) return;
|
| 514 |
+
T.msgs.push({ who: "me", text, conf: T.conf }); T.draft = ""; T.busy = true;
|
| 515 |
+
const conf = T.conf; T.conf = null; render(); scrollChat();
|
| 516 |
+
try {
|
| 517 |
+
const r = await api("/api/tutor/message", { method: "POST", body: JSON.stringify({ sessionId: T.sessionId, text, confidence: conf }) });
|
| 518 |
+
T.msgs.push({ who: "tutor", text: r.reply, changes: r.changes });
|
| 519 |
+
} catch (e) { T.msgs.push({ who: "system", text: e.message }); }
|
| 520 |
+
T.busy = false; render(); scrollChat();
|
| 521 |
+
const nb = $("tutor-input"); if (nb) nb.focus();
|
| 522 |
+
}
|
| 523 |
+
function scrollChat() { requestAnimationFrame(() => window.scrollTo(0, document.body.scrollHeight)); }
|
| 524 |
+
function levelBar(byLevel, total) {
|
| 525 |
+
const bar = h("div", { class: "lv-bar", role: "img", "aria-label": `Idea levels: ${byLevel.map((n, i) => `${n} at level ${i}`).join(", ")}` });
|
| 526 |
+
byLevel.forEach((n, i) => { if (n) bar.append(h("span", { class: `lv lv${i}`, style: `flex:${n}` })); });
|
| 527 |
+
if (!total) bar.append(h("span", { class: "lv lv0", style: "flex:1" }));
|
| 528 |
+
return bar;
|
| 529 |
+
}
|
| 530 |
+
function renderTutor(main, dock, dockRow) {
|
| 531 |
+
const st = S.studentId && S.students.get(S.studentId);
|
| 532 |
+
if (!st) { main.append(studentPicker(false)); return; }
|
| 533 |
+
if (!S.tutorOn) {
|
| 534 |
+
main.append(h("section", { class: "sheet" }, h("h2", { text: "The tutor isn't switched on yet" }),
|
| 535 |
+
h("p", { class: "muted", text: "Your parent needs to finish setting it up. Self-checks work as normal." })));
|
| 536 |
+
return;
|
| 537 |
+
}
|
| 538 |
+
if (!T.sessionId && !T.busy) {
|
| 539 |
+
if (!T.mastery) loadMastery();
|
| 540 |
+
main.append(h("section", { class: "sheet" }, h("h2", { text: `${st.name}, pick a chapter` }),
|
| 541 |
+
h("p", { class: "muted", text: "Today's practice is a short planned session: a few quick reviews, one or two new ideas, a stretch question and an exit ticket. Ask questions is free chat about the chapter. Your parent can read these chats." }),
|
| 542 |
+
h("div", { class: "legend" }, ...[0, 1, 2, 3, 4].map((i) => h("span", null, h("span", { class: `lv-dot lv${i}` }), ["not met", "recall", "apply", "combine", "exam-ready"][i])))));
|
| 543 |
+
const grid = h("div", { class: "sets" });
|
| 544 |
+
const sets = [...S.sets.values()].sort((a, b) => (a.subject || "").localeCompare(b.subject || ""));
|
| 545 |
+
for (const s of sets) {
|
| 546 |
+
const ms = T.mastery && T.mastery[s.id];
|
| 547 |
+
grid.append(h("div", { class: "set-card" },
|
| 548 |
+
h("span", { class: "code", text: `${s.subject} · ${s.code}` }), h("h3", { text: s.chapter }),
|
| 549 |
+
ms ? levelBar(ms.byLevel, ms.atoms) : h("div", { class: "lv-bar" }, h("span", { class: "lv lv0", style: "flex:1" })),
|
| 550 |
+
ms ? h("span", { class: "hint", text: `${ms.byLevel.slice(2).reduce((a, b) => a + b, 0)} of ${ms.atoms} ideas at apply level or above` }) : null,
|
| 551 |
+
h("div", { class: "students" },
|
| 552 |
+
h("button", { class: "btn accent", text: "Today's practice", onclick: () => tutorStart(s.id, "practice") }),
|
| 553 |
+
h("button", { class: "btn ghost", text: "Ask questions", onclick: () => tutorStart(s.id, "chat") }))));
|
| 554 |
+
}
|
| 555 |
+
main.append(grid);
|
| 556 |
+
return;
|
| 557 |
+
}
|
| 558 |
+
const set = S.sets.get(T.setId) || {};
|
| 559 |
+
const chat = h("section", { class: "sheet chat" },
|
| 560 |
+
h("div", { class: "test-bar" }, h("div", null, h("span", { class: "label", text: `${set.subject || ""} · ${T.mode === "practice" ? "Today's practice" : "Questions"}` }), h("h2", { text: set.chapter || "" }))));
|
| 561 |
+
for (const m of T.msgs) {
|
| 562 |
+
const b = h("div", { class: `bubble ${m.who}` }, h("p", { text: m.text }));
|
| 563 |
+
if (m.conf) b.append(h("span", { class: "hint", text: `You said: ${m.conf}` }));
|
| 564 |
+
if (m.changes && m.changes.length) {
|
| 565 |
+
const ups = m.changes.filter((c) => c.to > c.from).length, downs = m.changes.filter((c) => c.to < c.from).length;
|
| 566 |
+
if (ups || downs) b.append(h("span", { class: `pill ${ups && !downs ? "good" : downs && !ups ? "bad" : "warn"}`, text: [ups ? `${ups} idea${ups > 1 ? "s" : ""} up a level` : "", downs ? `${downs} idea${downs > 1 ? "s" : ""} to revisit` : ""].filter(Boolean).join(" · ") }));
|
| 567 |
+
}
|
| 568 |
+
chat.append(b);
|
| 569 |
+
}
|
| 570 |
+
if (T.busy) chat.append(h("div", { class: "bubble tutor" }, h("p", { class: "muted", text: "Thinking…" })));
|
| 571 |
+
main.append(chat);
|
| 572 |
+
dock.hidden = false;
|
| 573 |
+
const ta = h("textarea", { id: "tutor-input", rows: "2", placeholder: "Type your answer or question", "aria-label": "Your message", disabled: T.busy });
|
| 574 |
+
ta.value = T.draft;
|
| 575 |
+
ta.addEventListener("input", () => { T.draft = ta.value; });
|
| 576 |
+
ta.addEventListener("keydown", (e) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); tutorSend(); } });
|
| 577 |
+
const confRow = h("div", { class: "selfmark", role: "group", "aria-label": "How sure are you?" },
|
| 578 |
+
h("span", { class: "hint", text: "How sure?" }),
|
| 579 |
+
...["guess", "think so", "sure"].map((c) => h("button", { type: "button", "aria-pressed": String(T.conf === c), text: c,
|
| 580 |
+
onclick: () => { T.conf = T.conf === c ? null : c; T.draft = ta.value; render(); } })));
|
| 581 |
+
dockRow.append(h("div", { class: "composer" }, ta, h("div", { class: "composer-row" }, confRow,
|
| 582 |
+
h("button", { class: "btn ghost", text: "End", onclick: () => { T.sessionId = null; T.setId = null; T.msgs = []; T.mastery = null; render(); } }),
|
| 583 |
+
h("button", { class: "btn accent", text: "Send", disabled: T.busy, onclick: tutorSend }))));
|
| 584 |
+
}
|
| 585 |
+
|
| 586 |
+
// ---------- parent area ----------
|
| 587 |
+
const P = { pin: store.get("sw.ppin") || "", chats: null, open: null, err: "" };
|
| 588 |
+
async function papi(path) {
|
| 589 |
+
const res = await fetch(path, { headers: { "X-Parent-PIN": P.pin } });
|
| 590 |
+
let body = null; try { body = await res.json(); } catch {}
|
| 591 |
+
if (!res.ok) { const e = new Error((body && body.detail) || "Request failed"); e.status = res.status; throw e; }
|
| 592 |
+
return body;
|
| 593 |
+
}
|
| 594 |
+
async function loadParent() {
|
| 595 |
+
try { P.chats = await papi("/api/parent/chats"); P.err = ""; }
|
| 596 |
+
catch (e) {
|
| 597 |
+
P.err = e.message;
|
| 598 |
+
if (e.status === 401 || e.status === 503) { P.pin = ""; store.del("sw.ppin"); P.chats = null; }
|
| 599 |
+
else { P.chats = []; toast(e.message); }
|
| 600 |
+
}
|
| 601 |
+
render();
|
| 602 |
+
}
|
| 603 |
+
async function openChat(id) {
|
| 604 |
+
if (P.open && P.open.id === id) { P.open = null; return render(); }
|
| 605 |
+
try { P.open = await papi(`/api/parent/chats/${encodeURIComponent(id)}`); } catch (e) { toast(e.message); }
|
| 606 |
+
render();
|
| 607 |
+
}
|
| 608 |
+
function parentArea() {
|
| 609 |
+
const sec = h("section", { class: "sheet" }, h("h2", { text: "Parent area" }));
|
| 610 |
+
if (!P.pin) {
|
| 611 |
+
const inp = h("input", { type: "password", id: "ppin", inputmode: "numeric", autocomplete: "off", placeholder: "Parent PIN", "aria-label": "Parent PIN" });
|
| 612 |
+
sec.append(h("p", { class: "muted", text: "Tutor chats and downloads need the parent PIN." }),
|
| 613 |
+
P.err ? h("div", { class: "notice bad" }, h("p", { text: P.err })) : null,
|
| 614 |
+
h("form", { class: "add-student", onsubmit: (e) => { e.preventDefault(); P.pin = inp.value.trim(); if (!P.pin) return; store.set("sw.ppin", P.pin); loadParent(); } },
|
| 615 |
+
inp, h("button", { class: "btn ghost", type: "submit", text: "Unlock" })));
|
| 616 |
+
return sec;
|
| 617 |
+
}
|
| 618 |
+
if (P.chats == null) { loadParent(); sec.append(h("p", { class: "muted", text: "Loading chats…" })); return sec; }
|
| 619 |
+
const q = encodeURIComponent(P.pin);
|
| 620 |
+
sec.append(h("div", { class: "students" },
|
| 621 |
+
h("a", { class: "btn ghost", href: `/api/export/attempts.csv?pin=${q}`, text: "Attempts (CSV)" }),
|
| 622 |
+
h("a", { class: "btn ghost", href: `/api/export/answers.csv?pin=${q}`, text: "Every answer (CSV)" }),
|
| 623 |
+
h("a", { class: "btn ghost", href: `/api/export/atoms.csv?pin=${q}`, text: "Ideas by student (CSV)" }),
|
| 624 |
+
h("a", { class: "btn ghost", href: `/api/export/chats.csv?pin=${q}`, text: "All tutor chats (CSV)" }),
|
| 625 |
+
h("button", { class: "btn ghost", text: "Lock", onclick: () => { P.pin = ""; P.chats = null; P.open = null; store.del("sw.ppin"); render(); } })));
|
| 626 |
+
sec.append(h("h3", { text: "Tutor chats" }));
|
| 627 |
+
if (!P.chats.length) sec.append(h("p", { class: "muted", text: "No tutor chats yet." }));
|
| 628 |
+
for (const c of P.chats) {
|
| 629 |
+
const flags = c.flags || [];
|
| 630 |
+
const row = h("button", { class: "set-card chat-row", onclick: () => openChat(c.id) },
|
| 631 |
+
h("div", { class: "meta" }, h("strong", { text: c.student }), h("span", { text: `${c.subject} · ${c.chapter}` }), h("span", { text: c.mode === "practice" ? "practice" : "questions" }), h("span", { class: "mono", text: fmtDate(c.updated) })),
|
| 632 |
+
h("div", { class: "meta" }, h("span", { text: `${c.messages} messages` }), h("span", { text: `${c.correct}/${c.attempts} answers right` }),
|
| 633 |
+
...flags.map((f) => h("span", { class: `pill ${f.kind === "distress" ? "bad" : "warn"}`, text: f.kind.replace("_", " ") }))));
|
| 634 |
+
sec.append(row);
|
| 635 |
+
if (P.open && P.open.id === c.id) {
|
| 636 |
+
const log = h("div", { class: "chat log" });
|
| 637 |
+
for (const f of P.open.flags || []) log.append(h("div", { class: `notice ${f.kind === "distress" ? "bad" : ""}` }, h("p", { text: `Flag (${f.kind.replace("_", " ")}): ${f.note}` })));
|
| 638 |
+
for (const m of P.open.transcript) log.append(h("div", { class: `bubble ${m.role === "student" ? "me" : "tutor"}` },
|
| 639 |
+
h("span", { class: "hint", text: `${m.role === "student" ? c.student : "Tutor"} · ${fmtDate(m.t)}${m.confidence ? " · " + m.confidence : ""}` }), h("p", { text: m.text })));
|
| 640 |
+
sec.append(log);
|
| 641 |
+
}
|
| 642 |
+
}
|
| 643 |
+
return sec;
|
| 644 |
+
}
|
| 645 |
function connectionNotice() {
|
| 646 |
return h("div", { class: "notice bad" }, h("p", { text: "The results store isn't answering. Check the internet connection and reload the page." }));
|
| 647 |
}
|
|
|
|
| 890 |
}
|
| 891 |
main.append(hs);
|
| 892 |
|
| 893 |
+
main.append(parentArea());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 894 |
}
|
| 895 |
|
| 896 |
// ---------- chrome ----------
|
| 897 |
$("tab-practise").addEventListener("click", () => { if (S.view === "test" && !confirmLeave()) return; S.view = "practise"; S.run = null; render(); });
|
| 898 |
$("tab-progress").addEventListener("click", () => { if (S.view === "test" && !confirmLeave()) return; S.view = "progress"; S.run = null; render(); });
|
| 899 |
+
$("tab-tutor").addEventListener("click", () => { if (S.view === "test" && !confirmLeave()) return; S.view = "tutor"; S.run = null; T.mastery = null; render(); });
|
| 900 |
$("who").addEventListener("click", () => { if (S.view === "test") return toast("Submit or leave the self-check first"); S.view = "practise"; S.picking = true; render(); });
|
| 901 |
function confirmLeave() { saveDraft(); toast("Your answers are kept on this device. Open the self-check again to carry on."); clearInterval(timerHandle); return true; }
|
| 902 |
|
tools/build_tutor_data.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Package each chapter's canonical text, atoms and misconceptions for the tutor.
|
| 2 |
+
|
| 3 |
+
Reads every self-check in syllabus/igcse/selfcheck/*.json, follows its atoms_file to the
|
| 4 |
+
atoms workbook and the matching content/<code>/<slug>*.md, and writes
|
| 5 |
+
apps/selfcheck-space/data/chapters/<set id>.json.
|
| 6 |
+
|
| 7 |
+
Run from the project root: python apps/selfcheck-space/tools/build_tutor_data.py
|
| 8 |
+
"""
|
| 9 |
+
import json
|
| 10 |
+
import pathlib
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
import openpyxl
|
| 14 |
+
|
| 15 |
+
ROOT = pathlib.Path(__file__).resolve().parents[3]
|
| 16 |
+
IGCSE = ROOT / "syllabus" / "igcse"
|
| 17 |
+
OUT = ROOT / "apps" / "selfcheck-space" / "data" / "chapters"
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def rows(ws):
|
| 21 |
+
it = ws.iter_rows(values_only=True)
|
| 22 |
+
head = [str(c or "").strip().lower() for c in next(it)]
|
| 23 |
+
for r in it:
|
| 24 |
+
if r and r[0]:
|
| 25 |
+
yield {h: ("" if v is None else str(v).strip()) for h, v in zip(head, r)}
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def col(row, *prefixes):
|
| 29 |
+
for p in prefixes:
|
| 30 |
+
for k, v in row.items():
|
| 31 |
+
if k.startswith(p):
|
| 32 |
+
return v
|
| 33 |
+
return ""
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
def split_ids(s):
|
| 37 |
+
return [x for x in re.split(r"[;,\s]+", s or "") if x and x.lower() not in ("none", "-")]
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def main():
|
| 41 |
+
OUT.mkdir(parents=True, exist_ok=True)
|
| 42 |
+
for sc in sorted((IGCSE / "selfcheck").glob("*.json")):
|
| 43 |
+
s = json.loads(sc.read_text(encoding="utf-8"))
|
| 44 |
+
atoms_path = ROOT / s["atoms_file"]
|
| 45 |
+
slug = atoms_path.stem.removesuffix("_atoms")
|
| 46 |
+
content = sorted((IGCSE / "content" / s["code"]).glob(f"{slug}*.md"))
|
| 47 |
+
if not content:
|
| 48 |
+
raise SystemExit(f"no content file for {s['id']} ({slug})")
|
| 49 |
+
wb = openpyxl.load_workbook(atoms_path, read_only=True, data_only=True)
|
| 50 |
+
atoms = []
|
| 51 |
+
for r in rows(wb["atoms"]):
|
| 52 |
+
if r.get("type") == "misconception":
|
| 53 |
+
continue
|
| 54 |
+
atoms.append({
|
| 55 |
+
"id": r["id"], "type": r.get("type", ""), "statement": r.get("statement", ""),
|
| 56 |
+
"why": col(r, "why"), "prerequisites": split_ids(r.get("prerequisites", "")),
|
| 57 |
+
"tier": r.get("tier", ""), "paragraphs": col(r, "source_paragraphs"),
|
| 58 |
+
})
|
| 59 |
+
misconceptions = [{
|
| 60 |
+
"id": r["id"], "wrong": col(r, "wrong belief"), "correct": col(r, "correcting statement", "correcting stat"),
|
| 61 |
+
"atoms": split_ids(col(r, "correcting atom")),
|
| 62 |
+
} for r in rows(wb["misconceptions"])]
|
| 63 |
+
ids = {a["id"] for a in atoms}
|
| 64 |
+
for a in atoms: # keep only prerequisites inside this chapter
|
| 65 |
+
a["prerequisites"] = [p for p in a["prerequisites"] if p in ids]
|
| 66 |
+
doc = {
|
| 67 |
+
"id": s["id"], "subject": s["subject"], "code": s["code"], "chapter": s["chapter"],
|
| 68 |
+
"text": content[0].read_text(encoding="utf-8"), "atoms": atoms, "misconceptions": misconceptions,
|
| 69 |
+
}
|
| 70 |
+
(OUT / f"{s['id']}.json").write_text(json.dumps(doc, ensure_ascii=False), encoding="utf-8")
|
| 71 |
+
print(f"{s['id']}: {len(atoms)} atoms, {len(misconceptions)} misconceptions, "
|
| 72 |
+
f"{len(doc['text'].split())} words <- {content[0].name}")
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
if __name__ == "__main__":
|
| 76 |
+
main()
|
tutor.py
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""The StepWise tutor: a topic-bound Claude tutor with per-idea levels and spaced review.
|
| 2 |
+
|
| 3 |
+
Design: syllabus/igcse/midterm/TUTOR_AGENT_PLAN.md in the project repo.
|
| 4 |
+
|
| 5 |
+
- Mastery: each student holds a level 0-4 on every atom (idea). Two correct answers in a
|
| 6 |
+
row at or above the current level move it up one; a wrong answer moves it down one (two
|
| 7 |
+
if the student said they were sure) and makes it due tomorrow. Self-check results feed
|
| 8 |
+
the same levels.
|
| 9 |
+
- Sessions: "practice" runs a planned session (due reviews + new ideas whose
|
| 10 |
+
prerequisites are at level 2); "chat" is free questions on the chapter.
|
| 11 |
+
- Claude works only through four tools: get_student_state, record_attempt, calculate, flag.
|
| 12 |
+
- Every message, tool call and level change is stored; parents read the full text.
|
| 13 |
+
"""
|
| 14 |
+
from __future__ import annotations
|
| 15 |
+
|
| 16 |
+
import ast
|
| 17 |
+
import json
|
| 18 |
+
import math
|
| 19 |
+
import operator
|
| 20 |
+
import threading
|
| 21 |
+
import uuid
|
| 22 |
+
from datetime import datetime, timedelta, timezone
|
| 23 |
+
from pathlib import Path
|
| 24 |
+
|
| 25 |
+
MODEL = "claude-opus-5-5"
|
| 26 |
+
EFFORT = "medium"
|
| 27 |
+
MAX_TOOL_ROUNDS = 6
|
| 28 |
+
INTERVAL_DAYS = {0: 0, 1: 1, 2: 2, 3: 4, 4: 7}
|
| 29 |
+
LEVEL_NAMES = {0: "not met", 1: "recall", 2: "apply one step", 3: "combine", 4: "exam-ready"}
|
| 30 |
+
|
| 31 |
+
HERE = Path(__file__).parent
|
| 32 |
+
CHAPTERS: dict[str, dict] = {
|
| 33 |
+
json.loads(p.read_text(encoding="utf-8"))["id"]: json.loads(p.read_text(encoding="utf-8"))
|
| 34 |
+
for p in sorted((HERE / "data" / "chapters").glob("*.json"))
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def now() -> datetime:
|
| 39 |
+
return datetime.now(timezone.utc)
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def iso(d: datetime) -> str:
|
| 43 |
+
return d.isoformat(timespec="seconds")
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# ---------------------------------------------------------------- mastery
|
| 47 |
+
def blank_atom() -> dict:
|
| 48 |
+
return {"level": 0, "streak": 0, "seen": 0, "right": 0, "last": None, "due": None}
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def apply_result(m: dict, atom_id: str, correct: bool, level_tested: int, confidence: str | None, source: str) -> dict:
|
| 52 |
+
a = m.setdefault(atom_id, blank_atom())
|
| 53 |
+
before = a["level"]
|
| 54 |
+
a["seen"] += 1
|
| 55 |
+
a["last"] = iso(now())
|
| 56 |
+
if correct:
|
| 57 |
+
a["right"] += 1
|
| 58 |
+
if level_tested >= a["level"]:
|
| 59 |
+
a["streak"] += 1
|
| 60 |
+
if a["level"] == 0:
|
| 61 |
+
a["level"], a["streak"] = 1, 0 # first correct answer: met it
|
| 62 |
+
elif a["streak"] >= 2:
|
| 63 |
+
a["level"], a["streak"] = min(4, a["level"] + 1), 0
|
| 64 |
+
a["due"] = iso(now() + timedelta(days=INTERVAL_DAYS[a["level"]]))
|
| 65 |
+
else:
|
| 66 |
+
drop = 2 if confidence == "sure" else 1
|
| 67 |
+
a["level"] = max(0, a["level"] - drop)
|
| 68 |
+
a["streak"] = 0
|
| 69 |
+
a["due"] = iso(now() + timedelta(days=1))
|
| 70 |
+
a.setdefault("log", []).append({"t": a["last"], "ok": correct, "lv": level_tested, "conf": confidence, "src": source})
|
| 71 |
+
a["log"] = a["log"][-15:]
|
| 72 |
+
return {"atom": atom_id, "from": before, "to": a["level"]}
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
def apply_selfcheck(m: dict, set_id: str, attempt: dict) -> None:
|
| 76 |
+
"""A self-check answer counts as a level-2 test of each atom it covers."""
|
| 77 |
+
for atom_id, (got, mx) in attempt.get("atoms", {}).items():
|
| 78 |
+
if mx:
|
| 79 |
+
apply_result(m, atom_id, got / mx >= 0.8, 2, None, f"selfcheck:{set_id}")
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
def plan(m: dict, chapter: dict, reviews: int = 5, new: int = 2) -> dict:
|
| 83 |
+
t = now()
|
| 84 |
+
levels = {a["id"]: m.get(a["id"], blank_atom())["level"] for a in chapter["atoms"]}
|
| 85 |
+
due = [aid for aid, st in m.items() if aid in levels and st.get("due") and st["level"] > 0
|
| 86 |
+
and datetime.fromisoformat(st["due"]) <= t]
|
| 87 |
+
due.sort(key=lambda aid: (m[aid]["level"], m[aid]["due"]))
|
| 88 |
+
ready = [a["id"] for a in chapter["atoms"] if levels[a["id"]] == 0
|
| 89 |
+
and all(levels.get(p, 0) >= 2 for p in a["prerequisites"])]
|
| 90 |
+
return {"reviews": due[:reviews], "new": ready[:new]}
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
# ---------------------------------------------------------------- tools
|
| 94 |
+
TOOLS = [
|
| 95 |
+
{
|
| 96 |
+
"name": "get_student_state",
|
| 97 |
+
"description": "Get this student's current level (0-4) on every idea in this chapter, which ideas are due for review, recent results and their latest self-check score. Call it at the start of a session and whenever you need to choose what to ask next.",
|
| 98 |
+
"input_schema": {"type": "object", "properties": {}, "additionalProperties": False},
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"name": "record_attempt",
|
| 102 |
+
"description": "Record the student's answer to a question you asked, so their idea levels update. Call it once for every question the student actually attempts, after you have judged the answer, before you reply.",
|
| 103 |
+
"strict": True,
|
| 104 |
+
"input_schema": {
|
| 105 |
+
"type": "object",
|
| 106 |
+
"properties": {
|
| 107 |
+
"atom_ids": {"type": "array", "items": {"type": "string"}, "description": "1-4 atom ids the question tested, from this chapter's list."},
|
| 108 |
+
"correct": {"type": "boolean", "description": "True only if the answer AND the reasoning were right. A right answer with a wrong reason is false."},
|
| 109 |
+
"level_tested": {"type": "integer", "enum": [1, 2, 3, 4], "description": "1 recall, 2 apply one step, 3 combine ideas, 4 exam-style unfamiliar or multi-part."},
|
| 110 |
+
"misconception_id": {"type": ["string", "null"], "description": "Misconception id if the wrong answer matches one, else null."},
|
| 111 |
+
"question": {"type": "string", "description": "The question, in under 25 words."},
|
| 112 |
+
"student_answer": {"type": "string", "description": "The student's answer, in under 25 words."},
|
| 113 |
+
},
|
| 114 |
+
"required": ["atom_ids", "correct", "level_tested", "misconception_id", "question", "student_answer"],
|
| 115 |
+
"additionalProperties": False,
|
| 116 |
+
},
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"name": "calculate",
|
| 120 |
+
"description": "Evaluate an arithmetic expression exactly as written and return the number. Use it to check every numerical answer before you tell the student it is right or wrong. Supports + - * / ** ( ), sqrt(), log10(), and numbers like 6.02e23.",
|
| 121 |
+
"strict": True,
|
| 122 |
+
"input_schema": {
|
| 123 |
+
"type": "object",
|
| 124 |
+
"properties": {"expression": {"type": "string"}},
|
| 125 |
+
"required": ["expression"],
|
| 126 |
+
"additionalProperties": False,
|
| 127 |
+
},
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"name": "flag",
|
| 131 |
+
"description": "Flag something the parent should see: off_topic (student keeps pulling away from the subject), answer_seeking (student asks you to just give answers to homework or a test), distress (student says something upsetting or personal), other.",
|
| 132 |
+
"strict": True,
|
| 133 |
+
"input_schema": {
|
| 134 |
+
"type": "object",
|
| 135 |
+
"properties": {
|
| 136 |
+
"kind": {"type": "string", "enum": ["off_topic", "answer_seeking", "distress", "other"]},
|
| 137 |
+
"note": {"type": "string", "description": "One sentence for the parent."},
|
| 138 |
+
},
|
| 139 |
+
"required": ["kind", "note"],
|
| 140 |
+
"additionalProperties": False,
|
| 141 |
+
},
|
| 142 |
+
},
|
| 143 |
+
]
|
| 144 |
+
|
| 145 |
+
_OPS = {ast.Add: operator.add, ast.Sub: operator.sub, ast.Mult: operator.mul, ast.Div: operator.truediv,
|
| 146 |
+
ast.Pow: operator.pow, ast.USub: operator.neg, ast.UAdd: operator.pos}
|
| 147 |
+
_FUNCS = {"sqrt": math.sqrt, "log10": math.log10, "ln": math.log, "abs": abs, "round": round}
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
def safe_eval(expr: str) -> float:
|
| 151 |
+
def ev(n):
|
| 152 |
+
if isinstance(n, ast.Expression):
|
| 153 |
+
return ev(n.body)
|
| 154 |
+
if isinstance(n, ast.Constant) and isinstance(n.value, (int, float)):
|
| 155 |
+
return n.value
|
| 156 |
+
if isinstance(n, ast.BinOp) and type(n.op) in _OPS:
|
| 157 |
+
if isinstance(n.op, ast.Pow) and abs(ev(n.right)) > 400:
|
| 158 |
+
raise ValueError("exponent too large")
|
| 159 |
+
return _OPS[type(n.op)](ev(n.left), ev(n.right))
|
| 160 |
+
if isinstance(n, ast.UnaryOp) and type(n.op) in _OPS:
|
| 161 |
+
return _OPS[type(n.op)](ev(n.operand))
|
| 162 |
+
if isinstance(n, ast.Call) and isinstance(n.func, ast.Name) and n.func.id in _FUNCS and not n.keywords:
|
| 163 |
+
return _FUNCS[n.func.id](*[ev(a) for a in n.args])
|
| 164 |
+
raise ValueError("only numbers, + - * / ** ( ) and sqrt/log10/ln/abs/round are allowed")
|
| 165 |
+
cleaned = expr.replace("×", "*").replace("^", "**").replace("−", "-")
|
| 166 |
+
return ev(ast.parse(cleaned, mode="eval"))
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
# ---------------------------------------------------------------- prompts
|
| 170 |
+
RULES = """You are the StepWise tutor for a Cambridge IGCSE student (about 15 years old). You tutor ONE chapter, given below. Your job is to make the student's understanding visible and fix it, and to test them in small, increasing steps. You are not an answer machine.
|
| 171 |
+
|
| 172 |
+
How you teach
|
| 173 |
+
- One question at a time. Ask, then wait for the student's answer. Keep each message short (usually under 120 words); longer only when explaining an idea from first principles.
|
| 174 |
+
- Before explaining something new, ask the student to predict or try first.
|
| 175 |
+
- When they are stuck, use the hint ladder: (1) name the idea, (2) name the first step, (3) show the first step, (4) a worked example with DIFFERENT numbers, then they redo the original. Never give the final answer first.
|
| 176 |
+
- When they are right, ask why. A right answer with a wrong or missing reason does not count as correct.
|
| 177 |
+
- When a wrong answer matches a listed misconception, name it kindly, show a quick case where the wrong belief gives an absurd result, then ask a fresh question on the same idea.
|
| 178 |
+
- Ground every explanation in the chapter text below (you may cite paragraph ids like [P5] for yourself, but explain in plain words). If something is outside this chapter, say so briefly and offer to come back to the chapter.
|
| 179 |
+
- Check every number with the calculate tool before saying an answer is right or wrong. Never do arithmetic in your head.
|
| 180 |
+
- Use British spelling and IGCSE terms. Write chemistry and physics with Unicode (H₂O, 6.02 × 10²³, m/s²). Plain text with short lines; no tables, no headings, no LaTeX.
|
| 181 |
+
|
| 182 |
+
Levels (each idea, per student): 0 not met, 1 recall, 2 apply one step, 3 combine with other ideas, 4 exam-ready. Pitch questions at the student's current level or one above. Only introduce an idea when its prerequisites are at level 2. Combination questions may only use ideas the student already holds at level 2 or above.
|
| 183 |
+
|
| 184 |
+
Recording: after judging every attempted answer, call record_attempt with the atom ids it tested, before you reply. The student may tag a message with [confidence: guess|think so|sure]; that is attached automatically.
|
| 185 |
+
|
| 186 |
+
Boundaries
|
| 187 |
+
- Stay on this chapter, its subject's exam technique, and study skills. Redirect anything else in one friendly sentence. If they keep pulling away, call flag with off_topic.
|
| 188 |
+
- If they ask you to just give answers to homework, a test or a self-check, decline kindly, offer to work through the idea on a different example, and call flag with answer_seeking.
|
| 189 |
+
- If they say anything distressing or personal (feeling unsafe, very upset, self-harm, bullying), respond with warmth, do not counsel, suggest talking to a parent or a teacher they trust, and call flag with distress.
|
| 190 |
+
- The student knows their parent can read these chats. Be warm, encouraging and honest. Praise effort and good reasoning, not just right answers."""
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
def system_blocks(chapter: dict) -> list[dict]:
|
| 194 |
+
atoms = "\n".join(
|
| 195 |
+
f"{a['id']} [{a['type']}, {a['tier']}, {a['paragraphs']}] {a['statement']} | why: {a['why']}"
|
| 196 |
+
+ (f" | needs: {', '.join(a['prerequisites'])}" if a["prerequisites"] else "")
|
| 197 |
+
for a in chapter["atoms"])
|
| 198 |
+
mis = "\n".join(f"{m['id']}: wrong belief: {m['wrong']} | correct: {m['correct']} | fix with: {', '.join(m['atoms'])}"
|
| 199 |
+
for m in chapter["misconceptions"])
|
| 200 |
+
text = (f"{RULES}\n\n=== CHAPTER: {chapter['subject']} {chapter['code']}, {chapter['chapter']} ===\n\n"
|
| 201 |
+
f"--- Chapter text (canonical, from first principles) ---\n{chapter['text']}\n\n"
|
| 202 |
+
f"--- Ideas (atoms) ---\n{atoms}\n\n--- Known misconceptions ---\n{mis}\n")
|
| 203 |
+
return [{"type": "text", "text": text, "cache_control": {"type": "ephemeral", "ttl": "1h"}}]
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
# ---------------------------------------------------------------- sessions
|
| 207 |
+
class Tutor:
|
| 208 |
+
def __init__(self, store, students: dict, client_factory) -> None:
|
| 209 |
+
self.store = store # app.Store: .mastery, .chats, queue_write()
|
| 210 |
+
self.students = students
|
| 211 |
+
self.client_factory = client_factory
|
| 212 |
+
self.locks: dict[str, threading.Lock] = {}
|
| 213 |
+
|
| 214 |
+
def _lock(self, sid: str) -> threading.Lock:
|
| 215 |
+
return self.locks.setdefault(sid, threading.Lock())
|
| 216 |
+
|
| 217 |
+
def state_for(self, student_id: str, chapter: dict) -> dict:
|
| 218 |
+
m = self.store.mastery.get(student_id, {})
|
| 219 |
+
t = now()
|
| 220 |
+
out = []
|
| 221 |
+
for a in chapter["atoms"]:
|
| 222 |
+
st = m.get(a["id"], blank_atom())
|
| 223 |
+
out.append({"id": a["id"], "level": st["level"], "seen": st["seen"], "right": st["right"],
|
| 224 |
+
"due": bool(st.get("due") and datetime.fromisoformat(st["due"]) <= t and st["level"] > 0)})
|
| 225 |
+
last = [x for x in self.store.attempts if x["studentId"] == student_id and x["setId"] == chapter["id"]]
|
| 226 |
+
last.sort(key=lambda x: x["submittedAt"])
|
| 227 |
+
return {"ideas": out, "plan": plan(m, chapter),
|
| 228 |
+
"latest_selfcheck": (f"{last[-1]['score']}/{last[-1]['max']}" if last else "none yet")}
|
| 229 |
+
|
| 230 |
+
def _run_tool(self, sess: dict, name: str, args: dict) -> str:
|
| 231 |
+
chapter = CHAPTERS[sess["setId"]]
|
| 232 |
+
if name == "get_student_state":
|
| 233 |
+
return json.dumps(self.state_for(sess["studentId"], chapter))
|
| 234 |
+
if name == "calculate":
|
| 235 |
+
try:
|
| 236 |
+
v = safe_eval(args["expression"])
|
| 237 |
+
return json.dumps({"value": v, "rounded_3sf": float(f"{v:.3g}")})
|
| 238 |
+
except Exception as e: # noqa: BLE001 - report any evaluation problem to the model
|
| 239 |
+
return json.dumps({"error": str(e)})
|
| 240 |
+
if name == "record_attempt":
|
| 241 |
+
valid = {a["id"] for a in chapter["atoms"]}
|
| 242 |
+
ids = [a for a in args.get("atom_ids", []) if a in valid][:4]
|
| 243 |
+
if not ids:
|
| 244 |
+
return json.dumps({"error": "none of those atom ids are in this chapter"})
|
| 245 |
+
m = self.store.mastery.setdefault(sess["studentId"], {})
|
| 246 |
+
changes = [apply_result(m, a, bool(args["correct"]), int(args["level_tested"]), sess.get("confidence"), f"tutor:{sess['id']}")
|
| 247 |
+
for a in ids]
|
| 248 |
+
sess["attempts"].append({"t": iso(now()), **args, "confidence": sess.get("confidence"), "changes": changes})
|
| 249 |
+
self.store.queue_write(f"mastery/{sess['studentId']}.json", m)
|
| 250 |
+
return json.dumps({"recorded": True, "level_changes": changes})
|
| 251 |
+
if name == "flag":
|
| 252 |
+
sess["flags"].append({"t": iso(now()), **args})
|
| 253 |
+
return json.dumps({"flagged": True})
|
| 254 |
+
return json.dumps({"error": f"unknown tool {name}"})
|
| 255 |
+
|
| 256 |
+
def _turn(self, sess: dict) -> str:
|
| 257 |
+
client = self.client_factory()
|
| 258 |
+
chapter = CHAPTERS[sess["setId"]]
|
| 259 |
+
replies = []
|
| 260 |
+
for _ in range(MAX_TOOL_ROUNDS):
|
| 261 |
+
resp = client.beta.messages.create(
|
| 262 |
+
model=MODEL,
|
| 263 |
+
max_tokens=16000,
|
| 264 |
+
betas=["server-side-fallback-2026-07-01"],
|
| 265 |
+
fallbacks="default",
|
| 266 |
+
output_config={"effort": EFFORT},
|
| 267 |
+
system=system_blocks(chapter),
|
| 268 |
+
tools=TOOLS,
|
| 269 |
+
messages=sess["messages"],
|
| 270 |
+
)
|
| 271 |
+
u = resp.usage
|
| 272 |
+
sess["usage"]["input"] += u.input_tokens or 0
|
| 273 |
+
sess["usage"]["output"] += u.output_tokens or 0
|
| 274 |
+
sess["usage"]["cache_read"] += getattr(u, "cache_read_input_tokens", 0) or 0
|
| 275 |
+
sess["usage"]["cache_write"] += getattr(u, "cache_creation_input_tokens", 0) or 0
|
| 276 |
+
sess["messages"].append({"role": "assistant", "content": [b.to_dict() for b in resp.content]})
|
| 277 |
+
text = "\n".join(b.text for b in resp.content if b.type == "text").strip()
|
| 278 |
+
if text:
|
| 279 |
+
replies.append(text)
|
| 280 |
+
if resp.stop_reason == "refusal":
|
| 281 |
+
replies.append(f"I can't help with that one. Let's get back to {chapter['chapter']}.")
|
| 282 |
+
sess["flags"].append({"t": iso(now()), "kind": "other", "note": "The model declined a message."})
|
| 283 |
+
break
|
| 284 |
+
if resp.stop_reason != "tool_use":
|
| 285 |
+
break
|
| 286 |
+
results = []
|
| 287 |
+
for b in resp.content:
|
| 288 |
+
if b.type == "tool_use":
|
| 289 |
+
out = self._run_tool(sess, b.name, b.input or {})
|
| 290 |
+
sess["tools"].append({"t": iso(now()), "name": b.name, "input": b.input, "output": out})
|
| 291 |
+
results.append({"type": "tool_result", "tool_use_id": b.id, "content": out})
|
| 292 |
+
sess["messages"].append({"role": "user", "content": results})
|
| 293 |
+
reply = "\n\n".join(replies) or "Sorry, I lost my train of thought. Could you say that again?"
|
| 294 |
+
sess["transcript"].append({"role": "tutor", "text": reply, "t": iso(now())})
|
| 295 |
+
return reply
|
| 296 |
+
|
| 297 |
+
def start(self, student_id: str, set_id: str, mode: str) -> dict:
|
| 298 |
+
chapter = CHAPTERS[set_id]
|
| 299 |
+
name = self.students[student_id]["name"]
|
| 300 |
+
m = self.store.mastery.get(student_id, {})
|
| 301 |
+
sid = now().strftime("%Y%m%dT%H%M%S") + "-" + uuid.uuid4().hex[:6]
|
| 302 |
+
sess = {"id": sid, "studentId": student_id, "setId": set_id, "mode": mode, "started": iso(now()),
|
| 303 |
+
"updated": iso(now()), "messages": [], "transcript": [], "attempts": [], "flags": [], "tools": [],
|
| 304 |
+
"usage": {"input": 0, "output": 0, "cache_read": 0, "cache_write": 0}, "confidence": None}
|
| 305 |
+
if mode == "practice":
|
| 306 |
+
p = plan(m, chapter)
|
| 307 |
+
opener = "Start today's practice."
|
| 308 |
+
note = (f"Session context: the student is {name}. Mode: daily practice (about 15-20 minutes). "
|
| 309 |
+
f"Today's plan from the scheduler: review these due ideas first: {', '.join(p['reviews']) or 'none due'}; "
|
| 310 |
+
f"then introduce these new ideas: {', '.join(p['new']) or 'none ready, so deepen the weakest ideas instead'}; "
|
| 311 |
+
"then one combination question on recent ideas; then a two-question exit ticket. "
|
| 312 |
+
"Greet them by name in one line and ask the first question.")
|
| 313 |
+
else:
|
| 314 |
+
opener = "I'd like to ask some questions about this chapter."
|
| 315 |
+
note = (f"Session context: the student is {name}. Mode: free questions on this chapter. "
|
| 316 |
+
"Greet them by name in one line and ask what they would like to work on. "
|
| 317 |
+
"When they ask about an idea, teach it with the moves above and finish with a quick check question.")
|
| 318 |
+
sess["messages"] = [{"role": "user", "content": opener}, {"role": "system", "content": note}]
|
| 319 |
+
sess["transcript"].append({"role": "student", "text": opener, "t": iso(now())})
|
| 320 |
+
with self._lock(sid):
|
| 321 |
+
self.store.chats[sid] = sess
|
| 322 |
+
reply = self._turn(sess)
|
| 323 |
+
sess["updated"] = iso(now())
|
| 324 |
+
self.store.queue_write(f"chats/{sid}.json", sess)
|
| 325 |
+
return {"sessionId": sid, "reply": reply}
|
| 326 |
+
|
| 327 |
+
def message(self, sid: str, text: str, confidence: str | None) -> dict:
|
| 328 |
+
sess = self.store.chats[sid]
|
| 329 |
+
with self._lock(sid):
|
| 330 |
+
n_before = len(sess["attempts"])
|
| 331 |
+
sess["confidence"] = confidence
|
| 332 |
+
tagged = text + (f"\n[confidence: {confidence}]" if confidence else "")
|
| 333 |
+
sess["messages"].append({"role": "user", "content": tagged})
|
| 334 |
+
sess["transcript"].append({"role": "student", "text": text, "confidence": confidence, "t": iso(now())})
|
| 335 |
+
reply = self._turn(sess)
|
| 336 |
+
sess["updated"] = iso(now())
|
| 337 |
+
self.store.queue_write(f"chats/{sid}.json", sess)
|
| 338 |
+
changes = [c for att in sess["attempts"][n_before:] for c in att["changes"]]
|
| 339 |
+
return {"reply": reply, "changes": changes}
|