Python Foundations: from values to a working program — syllabus
Brule School / TAIAIO · Independent, non-credit learning. Printable using your browser’s Print command. No account needed.
Overview
Independent self-paced course · 6 lessons. Available short course
Six practical lessons. Predict, run, explain and improve a small local program.
Complete beginner short course · 6 lessons and a local practice-report project · content version 1.0 · reviewed 29 October 2026. This is an introduction, not a semester curriculum or professional qualification. Progress records your own review, not assessed competence.
Open lesson player · Read complete course text
Prerequisites & materials
No programming experience required. Use an existing local Python 3 installation and a plain-text editor to run the examples, or trace them on paper if Python is not available. No account, paid service, external package or personal data is needed. Examples were checked with Python 3.12.14.
Use the supplied lesson text, worked answers and self-check criteria. Optional practice notes may be kept on paper or in your own local file. Additional task-specific materials are stated in the lesson tasks below; no additional requirements are inferred here.
Learning outcomes
- Predict how assignments, integer arithmetic and printed output behave.
- Write and test conditions, including an exact boundary case.
- Define a small function with parameters and a useful returned result.
- Trace a finite loop and accumulate a result without resetting it accidentally.
- Use lists and dictionaries to represent fictional records and handle an empty list.
- Build, test and revise a local report program using synthetic records and explicit assumptions.
Lesson sequence & workload
The lesson records total 99 estimated minutes. This is a planning estimate, not measured learning time or academic credit. Do not add it to a separate project/workload estimate without checking the scope note. Complete beginner short course · 6 lessons and a local practice-report project · content version 1.0 · reviewed 29 October 2026. This is an introduction, not a semester curriculum or professional qualification. Progress records your own review, not assessed competence.
- Values, names and a first local script — 14 estimated minutes
Run or trace a short script, distinguish a number from text, and explain why a calculated value does not automatically update.
- Choose a path with conditions — 14 estimated minutes
Write an if/elif/else decision and check values below, at and above its boundary.
- Build a function that returns a useful result — 15 estimated minutes
Define and call a two-parameter function, distinguish return from print, and test the function against explicit expectations.
- Repeat work and keep a running total — 15 estimated minutes
Trace a for loop, use an accumulator correctly, and explain a range endpoint and an empty-loop result.
- Organize lists and dictionary records — 16 estimated minutes
Read and update a list and a dictionary, then loop through a list of consistently shaped fictional records.
- Project: a tested local practice report — 25 estimated minutes
Build a report function, verify five input cases, and revise a small program while keeping its stated behavior intact.
Assessment & feedback
6 explained multiple-choice checks across 6 lessons, plus the practical tasks below. Checks use prewritten explanations, not live AI or teacher grading. Compare your practical work against the worked answers and rubrics, then revise.
No course-wide numerical pass score, assessment weighting or institution-awarded grade is specified. Any project-specific criteria in the lessons remain controlling; answering checks alone does not establish practical competence.
Practice, project & rubric
These are the actual required practice tasks and self-check criteria, in lesson order. A separate final project is claimed only where the lesson itself specifies one. Full model answers remain in the linked course text.
1. Values, names and a first local script
Create a script with pages = 5 and minutes_each = 7. Calculate total, then change pages to 6. Print the old total, recalculate it and print the new total. Predict both outputs first. In a separate sentence, explain why printing "total" is different from printing total. Keep the prediction and correction in your own notes.
Rubric / self-check criteria
- Predicts 35 and 42 before checking, or records and explains a corrected prediction.
- Keeps the recalculation after the changed pages assignment.
- Distinguishes a quoted string from an unquoted name.
- Can identify the terminal command, source code and displayed output as three different things.
Worked answer and full lesson
2. Choose a path with conditions
Copy the example and run four separate versions with minutes set to -1, 19, 20 and 21; leave target at 20. Record the expected and actual message for each. Then temporarily change >= to > and identify the one supplied nonnegative test that changes. Restore the correct operator. Explain why four independent if statements would not necessarily behave like one if/elif/else chain.
Rubric / self-check criteria
- Uses a colon and consistent four-space indentation for each branch body.
- Separates assignment (=) from equality comparison (==).
- Records all four test cases, including the exact boundary and invalid negative value.
- Explains which case catches > instead of >= and restores the intended rule.
Worked answer and full lesson
3. Build a function that returns a useful result
Write minutes_left yourself and test (completed, target) pairs (7, 15), (15, 15), (18, 15) and (0, 0). Predict each result first. Store the first result as remaining and calculate remaining + 2 to represent a separate two-minute setup task. Explain what would go wrong if the function printed its result but did not return it.
Rubric / self-check criteria
- Defines the function with two parameters and calls it with the intended argument order.
- Returns integers instead of relying on displayed output.
- Checks ordinary, equal, over-target and zero-target cases.
- Reuses the returned result in a separate expression and states the nonnegative-integer input assumption.
Worked answer and full lesson
4. Repeat work and keep a running total
Use durations = [6, 9, 0, 10]. Write a loop that prints only the final total, and write the running totals in your notes. Repeat with durations = []. Then use a separate for loop over range(1, 4) to print three numbered practice rounds. Explain why placing total = 0 inside the duration loop would be wrong.
Rubric / self-check criteria
- Initializes each accumulator before the relevant loop.
- Shows the four intermediate totals and the final total 25.
- Checks the empty collection without an undefined variable.
- Explains both indentation placement and the excluded range endpoint.
Worked answer and full lesson
5. Organize lists and dictionary records
Create a sessions list with records Grid = 9 minutes and Line = 16 minutes. Append Curve = 5 minutes, then correct Line to 18 minutes. Print the count and every label-duration pair. Finally, total the durations using a loop. Identify the expression for the second record’s minutes and explain why sessions[3] is invalid after these changes.
Rubric / self-check criteria
- Creates three records with the same label and minutes keys.
- Appends without assigning the None return value back to sessions.
- Updates the second record at index 1 and reports the final total 32.
- Distinguishes list length, list position and dictionary key lookup.
Worked answer and full lesson
6. Project: a tested local practice report
Build practice_report.py using synthetic records Tiles = 12, Lines = 20 and Motifs = 28 minutes. Write summarize(sessions, target), display the three reported fields, and verify these five cases: (1) the supplied records at target 20; (2) the same records at target 25; (3) one 20-minute record at target 20; (4) an empty list at target 20; (5) two records with 0 and 19 minutes at target 20. For each case record expected and actual (session count, total minutes, met target). Revise the display label At target to Sessions meeting target without changing the function, then rerun the checks. Keep the code, five-case check and one-paragraph explanation locally.
Rubric / self-check criteria
- Contract: states the required record keys, nonnegative integer durations, positive integer target and empty-list behavior.
- Implementation: uses parameters, a finite loop, two initialized accumulators, a >= condition and a dictionary returned after the loop.
- Verification: records actual results matching all five expected triples, or documents and fixes a mismatch before marking reviewed.
- Separation: changes the display label without changing the calculation and reruns the checks.
- Explanation: traces the main case, notes that each session is tested individually, and avoids claiming that minutes measure competence.
Worked answer and full lesson
Completion & limitations
For a meaningful self-study completion, work through the lessons, attempt the tasks before inspecting answers, compare with the stated criteria, and revise missing parts. Complete any delayed practice or performance tasks over their stated period. If a practical task cannot be performed, record it as pending rather than mastered.
“Mark lesson reviewed” records personal review only. Show all reveals text; neither awards a grade nor demonstrates competence. There is no verified instructor assessment, accredited credit, degree or professional qualification. These learning materials do not establish equivalence to a university course. Source organisations do not endorse the school.
Version & sources
Content fingerprint: 4d425c4d7b91. This identifies the source content used to generate this syllabus; it is not an independent review date. Source-check dates below are retained from the course, not silently updated.