Capstone — a tool someone else can run

Lab utilisation: percent, an 80% flag, two rooms, a print a technician can read, a test. README energy. That is handover — not FINAL3.ipynb.

Library desk

A fee function you can test.

You will be able to

  • Ship one tested utilisation rule at 80 percent
  • Print a line a technician can read for two rooms
  • Keep CONFIG, percent, over and a PASS test in one file-shaped program

Lab utilisation is the job, not FINAL3.ipynb

One percent function, an 80 percent flag, two rooms, a print a technician can read. README energy: sample numbers, a rule in one place, a test. That is what you hand to the next intern. A notebook with hidden cells is a lab log, not a tool.

percent(used, seats) returns a number. over(used, seats) returns a flag and must call percent — so define percent first. The kiosk formats. Tests lock 9/10 → 90 and 9/10 → OVER if the threshold is 80. When the principal changes 80 to 85, one CONFIG name changes.

Handover checklist

How to run (even if here it is Run in the sandbox). What the numbers mean. What OVER means. Where CONFIG lives. You already practised venv, logs, UTF-8, wrap, paise and tests. A capstone is those habits in one small program — not a new language.

Words that matter

Capstone
A small complete tool: rule, test, readable output.
Threshold
A config number — 80 percent full — not scattered 80s.
Handover
Someone else can run it without you in the room.

Common mistakes

Avoid: The 80 percent rule copied into the print, the chart and a WhatsApp draft.

Do this: One percent, one over, CONFIG, two rooms, a test.

Run it step by step

Each box is a real program. Press Run, change a number, Run again — the output must follow your code.

1. Step 1 — the percent contract

9 of 10 is 90. This is the spec.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

2. Step 2 — threshold as config

Change 80 in CONFIG. over calls percent. Define percent first.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

Example program — Two rooms, one rule, a test

A technician can read this. An intern can change the limit once.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

Your turn — Utilisation

percent(used, seats) returns used * 100 / seats. Print percent(9, 10) so 90 appears.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

Self-assessment

Check your understanding before you mark the lesson complete.

1. An 80% lab-over rule should live in…
2. A handover tool needs…

Progress is stored in a browser cookie on this device.