Reference synthesis
An editorial comparison of the core argument, alternative explanations and practical evidence.
A curated synthesis cannot be neutral or exhaustive. Follow the primary sources when an interpretation matters.
Finding the next step…
Learn Python through a small command-line tool: data, functions, files, tests and clear error handling.
No subject-specific background required; work through the opening foundation.
A tested reading-log command-line program that saves and retrieves data.
Python Software Foundation · reference
Named section and worked examples
Free full text
Open the readingPython tutorial: an informal introduction. Run each expression and predict its result before executing it.
Python Software Foundation · reference
Named section and worked examples
Free full text
Open the readingPython Software Foundation · reference
Named section and worked examples
Check reading access
Open the readingPython tutorial: control flow. Trace conditions, loops and function calls by hand.
Python tutorial: data structures. Compare lists, dictionaries and sets for your reading log.
What is printed by this code, and why? books = ["Dune"] reading = books reading.append("Kindred") print(len(books))
Ask whether the assignment creates a new list or another name for the same list.
It prints 2. Both names refer to the same list, so appending through reading also changes the list reached through books. To create a separate shallow copy, use reading = books.copy().
What to look for
Common mistake: Treating assignment as a copy of the list.
Start this pathway to keep your answers in My learning.
Python Software Foundation · reference
Named section and worked examples
Free full text
Open the readingPython Software Foundation · reference
Named section and worked examples
Check reading access
Open the readingPython Software Foundation · reference
Named section and worked examples
Check reading access
Open the readingPython Software Foundation · reference
Named section and worked examples
Check reading access
Open the readingPython tutorial: modules. Separate the data layer from command-line interaction.
Python tutorial: input and output. Save and reload a small JSON file; handle text encodings.
Python reference: argparse. Build commands with useful help and validation.
Python reference: unittest. Test normal, empty and invalid cases.
A function returns sum(values) / len(values). What happens for an empty list? Choose and implement a clear behaviour for that case.
Check the denominator before calculating the average.
The empty list has length 0, so the division raises ZeroDivisionError. One reasonable contract is to return None when there are no values: def average(values): if not values: return None return sum(values) / len(values) Test [], [4] and [2, 6], expecting None, 4.0 and 4.0.
What to look for
Common mistake: Returning 0 without explaining that an empty collection has no arithmetic mean.
Start this pathway to keep your answers in My learning.
Python Software Foundation · reference
Named section and worked examples
Check reading access
Open the readingPython Software Foundation · reference
Named section and worked examples
Check reading access
Open the readingPython tutorial: errors and exceptions. Distinguish invalid user input from programming errors.
Python tutorial: classes. Compare a class with a plain function and dictionary design.
How would you show that your reading log survives closing the program? Describe a test with an expected result.
A successful save message is different from successfully loading the saved records.
Add two records with different statuses, save them, end the process and start it again. Load the saved file and compare titles and statuses with the original records. Also test a missing file and a malformed file, checking that the program explains the problem and preserves recoverable work.
What to look for
Common mistake: Testing only the in-memory list in the process that performed the save.
Start this pathway to keep your answers in My learning.
Editorial perspectives based on selected works, rather than author-endorsed reading lists.
An editorial comparison of the core argument, alternative explanations and practical evidence.
A curated synthesis cannot be neutral or exhaustive. Follow the primary sources when an interpretation matters.
An editorial route that starts with working examples.
The order supports a particular study method; it does not establish which account is true.
An editorial route that starts with competing explanations.
The order supports a particular study method; it does not establish which account is true.
Background, different viewpoints, and further reading.
Run each expression and predict its result before executing it.
Named section and worked examples
Trace conditions, loops and function calls by hand.
Named section and worked examples
Compare lists, dictionaries and sets for your reading log.
Named section and worked examples
Separate the data layer from command-line interaction.
Named section and worked examples
Save and reload a small JSON file; handle text encodings.
Named section and worked examples
Distinguish invalid user input from programming errors.
Named section and worked examples
Compare a class with a plain function and dictionary design.
Named section and worked examples
Locate tools for paths, dates and argument parsing.
Named section and worked examples
Create an isolated environment and record dependencies.
Named section and worked examples
Use help and examples to learn a function’s contract.
Named section and worked examples
Check mutability, equality and collection operations.
Named section and worked examples
Build file paths without string concatenation.
Named section and worked examples
Handle round-trip data and malformed input.
Named section and worked examples
Import a reading list and preserve quoted values.
Named section and worked examples
Build commands with useful help and validation.
Named section and worked examples
Test normal, empty and invalid cases.
Named section and worked examples
Compare a small database with JSON persistence.
Named section and worked examples
Use counters to summarise a dataset.
Named section and worked examples
Describe data contracts and inspect what types do not enforce.
Named section and worked examples
Make failures diagnosable without overwhelming the user.
Named section and worked examples
Use functions, tests and small programs to compare algorithm correctness and performance.
Practise variables, functions and conditionals before tracing ownership in Rust.
If you choose the Python workflow, use functions and file handling to build the SQLite reading log.
Use Python functions, arrays and tests in the model-training tasks.
Use a small program for the optional simulations; a spreadsheet also supports the opening work.
Use spaced practice and small transfer tasks to check what you can program without copying.