Guided course - 5 chapters
Python: A Practical Course with Ethan Cho
Ethan Cho teaches Python through five practical chapters that move from a clear foundation to guided work, applied decisions, and revision. You will finish with a working program, configuration, or technical walkthrough, a tutor-ready capstone, saved notes, and a repeatable way to continue practicing.
Your course progress
0 of 5 chapters complete
0%Sign in is required to save progress, checkpoint answers, and notes. Sign in to continue.
What you will learn
Build knowledge, use it, and leave with evidence of progress.
-
Explain the essential Python vocabulary through a connected mental model.
-
Follow and explain a reliable technical problem solving workflow in guided practice.
-
Apply Python to a realistic scenario with visible constraints and tradeoffs.
-
Evaluate and revise a working program, configuration, or technical walkthrough using evidence-based success criteria.
-
Complete a capstone and leave with a specific next-practice plan.
Before you start
- Comfort using a web browser and basic files
- No previous programming experience is required unless a chapter says otherwise
Useful materials
- A laptop or desktop computer
- A text editor or browser-based coding environment
- A notes file for test cases and debugging observations
Suggested rhythm
Complete one 30-minute chapter at a time: learn for 10 minutes, practice for 15, then use 5 minutes for the checkpoint and notes.
Course capstone
Working Python mini project
Build a focused Python solution for a clear user need and show how you tested the important behavior.
What you will submit
- A working project or documented configuration
- Three test cases with results
- A concise README explaining decisions and next improvements
How it will be reviewed
- Core behavior works as intended
- The solution is understandable
- Tests cover likely failures
- Technical choices are explained
Course chapters
Learn, practice, check, and record what matters.
-
Chapter 1
Python: Foundations and vocabulary
Build a dependable mental model for Python before trying to memorize isolated details. You will define the essential vocabulary, inspect a worked example, and turn the ideas into a reference you can actually use.
Learning objectives
- Explain the purpose of Python in your own words.
- Use the chapter vocabulary accurately in a short example.
- Distinguish a strong example from a common misconception.
- Create a compact reference for later practice.
Key terms
1 Start with the purpose
Place Python inside a small but realistic software or digital-safety task. Name the result a learner is trying to produce and the constraints that make the skill useful.
2 How Python actually works
These are the load-bearing ideas. Everything later in the course is an application of one of them, so it is worth reading slowly and returning to when something stops making sense.
- Default arguments are evaluated once. A default value is created when the function is defined, not on each call, so a mutable default such as a list persists between calls and quietly accumulates state. The standard fix is to default to None and construct the container inside the function body.
- Identity is not equality. The == operator compares values, while `is` compares object identity. Python caches small integers and short strings, so `is` sometimes appears to work and the resulting bug is intermittent; reserve `is` for None, True and False.
- Dictionaries preserve insertion order. Since Python 3.7 the language guarantees that dicts iterate in insertion order, a behaviour that was only an implementation detail in 3.6. Sets carry no such guarantee, so never rely on set iteration order being stable.
3 Misconceptions worth clearing early
Each of these is common, understandable, and expensive to leave in place. Recognising them now saves rework later.
- Modifying a list while iterating over it. The loop appears to visit every element, so removal inside it looks safe. Fix: Iterate over a copy of the list, or build a new list with a comprehension and rebind the name.
- Catching bare except. It looks like a way to make code robust against every possible failure. Fix: A bare except also swallows keyboard interrupts and exit calls. Catch Exception, or better, the specific error class you expect.
- Changing several things at once when something breaks. It feels faster than testing one change at a time. Fix: Change one thing, observe, and revert it if the behaviour does not move; keep the loop small.
4 Build the mental model
Connect the key terms as a process rather than a word list. Use this sequence: decompose the problem, build one testable step, inspect the result, and debug deliberately.
5 Catch the common miss
Compare a surface-level attempt with one that shows correct behavior, readable structure, useful tests, and an explained decision. Explain the single difference that matters most.
Visual modelPython at a glance
Use this map to connect the purpose, vocabulary, example, and quality check before memorizing details.
Python foundationsStore values and calculate a result
scores = [72, 88, 91] average = sum(scores) / len(scores) print(f"Average: {average:.1f}")Create the listscores = [72, 88, 91]Python allocates one list holding three numbers and points the name scores at it.
Memory right nowScrub through the steps and watch the memory panel: the entire point of each line is what it does to the data.
Side-by-side comparisonTwo programs that both "work"
Both attempts look plausible from a distance. Toggle the highlights and study where they part ways.
Aspect Fragile script Dependable program Behavior Right answer for the one input tried so far Right answer for normal, empty, and extreme inputs Readability Single-letter names; the intent lives in the author's head Names describe the data; the next reader needs no tour guide Failure Crashes or returns nonsense on an empty list Guards the edge case and proves it with a test The difference is invisible on the happy path and decisive everywhere else.
Practice roundMatch the Python vocabulary
Tap a term, then the definition it belongs to. Wrong guesses cost nothing but honesty.
Retrieval beats rereading: pulling a definition from memory strengthens it far more than recognizing it on the page.
- Clear the board once, shuffle, and beat your attempt count.
- Say each definition aloud before tapping — then check yourself.
Practice activity - 12 minMake a one-page field guide
Create a compact field guide that would help a new learner recognize and begin using Python.
- Write a one-sentence definition and purpose.
- Add the four key terms with a plain-language example.
- Include one non-example and explain why it misses.
- Finish with a three-step starter checklist.
DeliverableOne annotated page or slide that can be reused in later chapters.
Success looks like- The definition is specific.
- Examples match the vocabulary.
- The checklist is usable without extra explanation.
Knowledge check1 questionWhich response best shows a usable foundation in Python?
Not startedSign in to save chapter notes to your account.
-
Chapter 2
JavaScript: Guided demonstration
Follow a complete JavaScript example from setup to result, pausing at the decisions that experts often make silently. Then repeat the process with support and check your work against visible criteria.
Learning objectives
- Sequence the main steps in a reliable JavaScript workflow.
- Explain why each important decision is made.
- Complete a supported example without skipping verification.
- Use a checklist to identify one correction.
Key terms
1 Watch the whole process
Trace a model from the initial prompt to a working program, configuration, or technical walkthrough. Mark each point where the learner must observe, choose, or verify rather than act automatically.
2 Worked example: Predicting the output order of an event-loop snippet
Follow each step and predict the next before you read it. Predicting first is what turns a demonstration into practice.
- A script logs A, then schedules a timer logging B with zero delay, then a resolved promise logging C, then logs D directly.
- The synchronous statements execute first in source order, printing A and then D.
- The call stack empties, so the microtask queue drains next and prints C.
- Only afterwards does the event loop pick up the timer macrotask and print B, giving the order A, D, C, B.
A setTimeout of zero does not mean immediately; it means after the current task and after every pending microtask.
3 Where this usually goes wrong
Watch for these while you work through the demonstration rather than afterwards.
- Expecting an async function to return its value directly. The body reads like ordinary sequential code, so the return looks ordinary too. Fix: An async function always returns a promise. Await the call, or chain a then handler onto it.
- Losing the value of this when passing a method as a callback. The method reference is handed over without its receiver object attached. Fix: Wrap it in an arrow function or bind the method, since arrow functions take this from the enclosing scope.
- Changing several things at once when something breaks. It feels faster than testing one change at a time. Fix: Change one thing, observe, and revert it if the behaviour does not move; keep the loop small.
4 Practice with scaffolding
Repeat the model with one detail changed. Keep the prompts visible and say or write the reason for each choice before continuing.
5 Check before feedback
Use correct behavior, readable structure, useful tests, and an explained decision as the quality test. Make one self-correction before asking the tutor to review the result.
Guided flowchartA complete JavaScript practice run
flowchart LR N1["Read the task"] N2["Model one step"] N3["Try with support"] N4["Verify the result"] N1 --> N2 N2 --> N3 N3 --> N4Pause at each arrow and explain the decision before moving to the next step.
Worked JavaScriptTrace data through a function
Live output readyTwo calls, one function: the same recipe transforms different inputs into different strings.
- Scrub the 3 upward one step at a time — percent moves in jumps of 20. Why 20?
- Make total 0. What does the output show, and what would you add to guard against it?
Practice roundRebuild the JavaScript method
The steps of this chapter's method, shuffled. Arrange them so they would actually work.
A method is a sequence, not a bag of tips — if the order surprises you, that is exactly the gap worth closing now.
- Order the steps, then explain to yourself why step 2 cannot go last.
- Shuffle again and solve it in fewer moves.
Practice activity - 15 minComplete the guided run
Use the chapter workflow to produce a working program, configuration, or technical walkthrough for a slightly changed JavaScript example.
- Restate the task and constraints.
- Follow the model one decision at a time.
- Record the reason for two key choices.
- Check the result and revise one issue.
DeliverableA completed guided example with two decision notes and one correction.
Success looks like- The workflow is complete.
- Decisions have reasons.
- The final check produces a visible correction.
Knowledge check1 questionDuring guided JavaScript practice, when is the best time to explain a choice?
Not startedSign in to save chapter notes to your account.
-
Chapter 3
APIs: Applied scenario
Transfer APIs into a realistic scenario where the prompt is less tidy and more than one option may be reasonable. You will define the constraints, choose an approach, and defend the tradeoff.
Learning objectives
- Extract the relevant facts and constraints from a realistic scenario.
- Generate at least two plausible approaches to APIs.
- Choose an approach using explicit criteria.
- Explain the likely consequence of the choice.
Key terms
1 Read the situation
Translate the scenario into a clear task. Separate facts, assumptions, constraints, and information that is interesting but not relevant to APIs.
2 Choosing well under real constraints
Applied work is mostly judgement under limits: less time, less information, and more competing goals than a textbook example allows. These are the decision rules that hold up in practice.
- Two approaches both look workable: Choose the one you can test more easily; testability compounds faster than elegance.
- The task feels too large to start: Cut it until one piece can be finished and verified in under an hour, then build outward.
- You are unsure whether something is a real bug: Write the smallest input that reproduces it; if you cannot reproduce it, you cannot claim to have fixed it.
3 Reading the situation before acting
Before choosing an approach, state three things explicitly: what result the situation actually requires, which constraints are fixed rather than preferences, and what evidence would tell you the approach is working. Skipping this step is the most common reason competent work solves the wrong problem.
- Default arguments are evaluated once. A default value is created when the function is defined, not on each call, so a mutable default such as a list persists between calls and quietly accumulates state. The standard fix is to default to None and construct the container inside the function body.
4 Practitioner notes
Small pieces of working knowledge that rarely appear in introductory material.
- Search the standard library before writing a helper. collections.Counter, itertools.groupby and functools.lru_cache replace a surprising amount of hand-rolled code.
- Use one virtual environment per project and pin your dependencies, so a global package upgrade cannot silently break code that worked yesterday.
5 Compare real options
Generate two workable approaches and test both against the purpose. Do not hide the tradeoff; name what each option improves and what it gives up.
6 Make the reasoning visible
Produce a working program, configuration, or technical walkthrough and attach a short decision note. The note should make the result auditable, not merely confident.
Visual modelFrom scenario to decision
A realistic task becomes manageable when facts and constraints are separated before options are compared.
Practice roundMatch the APIs vocabulary
Tap a term, then the definition it belongs to. Wrong guesses cost nothing but honesty.
Retrieval beats rereading: pulling a definition from memory strengthens it far more than recognizing it on the page.
- Clear the board once, shuffle, and beat your attempt count.
- Say each definition aloud before tapping — then check yourself.
Practice activity - 18 minSolve the scenario
Apply APIs to a scenario from school, work, home, or community life that includes at least two constraints.
- Write the task, audience, and constraints.
- Sketch two possible approaches.
- Choose using three criteria from the chapter.
- Produce the result and explain one tradeoff.
DeliverableA scenario response with an option comparison and a short decision note.
Success looks like- Constraints are visible.
- Both options are plausible.
- The final choice follows the stated criteria.
Knowledge check1 questionWhat makes an applied APIs decision defensible?
Not startedSign in to save chapter notes to your account.
-
Chapter 4
Algorithms: Review and improve
Learn to diagnose and improve Algorithms work with a focused rubric instead of vague judgment. You will separate symptoms from causes, revise the highest-value issue, and document the before-and-after difference.
Learning objectives
- Evaluate a draft using explicit Algorithms criteria.
- Identify the cause behind the most important weakness.
- Choose a revision with high impact and reasonable effort.
- Explain how the revision changes the result.
Key terms
1 Use the rubric, not a feeling
Review the work for correct behavior, readable structure, useful tests, and an explained decision. Record evidence for each judgment so feedback points to something observable.
2 Diagnostic checklist
Run this before you revise anything. Diagnosing first prevents the common failure of polishing the parts that were already fine.
- Check: Modifying a list while iterating over it — is this present in your work?
- Check: Catching bare except — is this present in your work?
- Check: Changing several things at once when something breaks — is this present in your work?
- Check: Reading code without running it — is this present in your work?
3 The quality bar
This is what finished work looks like in this field. Use it as the standard for your revision rather than a general sense of improvement.
- The behaviour is correct on ordinary input and on at least one awkward edge case
- Names describe intent, so the code can be read without the author present
- There is a concrete way to demonstrate that it works, not just an assurance
4 Diagnose before editing
Name the symptom, then ask what decision or missing step produced it. Choose the cause you can address rather than changing everything at once.
5 Revise and compare
Make one purposeful revision and compare the two versions. Keep the change only if it improves the intended result without creating a larger problem.
Revision flowchartEvidence-led improvement loop
flowchart LR N1["Inspect evidence"] N2["Find the likely cause"] N3["Revise one issue"] N4["Compare versions"] N1 --> N2 N2 --> N3 N3 --> N4Revise the cause of the highest-value issue, then compare the new result with the original criteria.
Debugging exampleProtect an edge case with tests
def safe_average(values): if not values: return 0 return sum(values) / len(values) assert safe_average([]) == 0 assert safe_average([2, 4, 6]) == 4Define with a guarddef safe_average(values):The function is stored. The interesting part is how it behaves at the boundary.
Memory right nowTwo calls, two paths: the empty list takes the guard clause, the full list takes the arithmetic.
Side-by-side comparisonTwo programs that both "work"
Use this pair as your revision rubric: find which column your current draft sits in, one row at a time.
Aspect Fragile script Dependable program Behavior Right answer for the one input tried so far Right answer for normal, empty, and extreme inputs Readability Single-letter names; the intent lives in the author's head Names describe the data; the next reader needs no tour guide Failure Crashes or returns nonsense on an empty list Guards the edge case and proves it with a test The difference is invisible on the happy path and decisive everywhere else.
Practice roundRebuild the Algorithms method
The steps of this chapter's method, shuffled. Arrange them so they would actually work.
A method is a sequence, not a bag of tips — if the order surprises you, that is exactly the gap worth closing now.
- Order the steps, then explain to yourself why step 2 cannot go last.
- Shuffle again and solve it in fewer moves.
Practice activity - 16 minRun a focused revision cycle
Review a previous Algorithms artifact or the supplied flawed example, then improve the most consequential issue.
- Score the draft against three criteria.
- Quote or point to evidence for the weakest score.
- Name the likely cause and revise it.
- Write a before-and-after comparison.
DeliverableA marked-up draft, revised version, and four-sentence change note.
Success looks like- Feedback cites evidence.
- The revision addresses a cause.
- The comparison explains a measurable or observable improvement.
Knowledge check1 questionWhich feedback is most useful for improving Algorithms?
Not startedSign in to save chapter notes to your account.
-
Chapter 5
Software architecture: Capstone integration
Integrate the course methods in a compact Software architecture capstone. You will define the brief, plan milestones, produce a complete result, gather tutor feedback, and leave with a repeatable next-practice plan.
Learning objectives
- Translate the capstone brief into milestones and checks.
- Combine the course methods without losing the central purpose.
- Present evidence for the quality of the final result.
- Choose the next skill to practice from the final review.
Key terms
1 Define a finishable brief
Choose a specific audience, result, and boundary for the Software architecture capstone. Reduce scope until the project can be finished and reviewed in one focused cycle.
2 Bringing the parts together
A capstone is judged on coherence, not on the number of techniques it includes. Return to the core ideas and make sure the work demonstrates them rather than decorating them.
- Default arguments are evaluated once. A default value is created when the function is defined, not on each call, so a mutable default such as a list persists between calls and quietly accumulates state. The standard fix is to default to None and construct the container inside the function body.
- Identity is not equality. The == operator compares values, while `is` compares object identity. Python caches small integers and short strings, so `is` sometimes appears to work and the resulting bug is intermittent; reserve `is` for None, True and False.
- Dictionaries preserve insertion order. Since Python 3.7 the language guarantees that dicts iterate in insertion order, a behaviour that was only an implementation detail in 3.6. Sets carry no such guarantee, so never rely on set iteration order being stable.
3 Standards that make the work credible
These are the marks of work that would be taken seriously by someone who does this professionally.
- The behaviour is correct on ordinary input and on at least one awkward edge case
- Names describe intent, so the code can be read without the author present
- There is a concrete way to demonstrate that it works, not just an assurance
4 Practitioner notes
Small pieces of working knowledge that rarely appear in introductory material.
- Search the standard library before writing a helper. collections.Counter, itertools.groupby and functools.lru_cache replace a surprising amount of hand-rolled code.
- Use one virtual environment per project and pin your dependencies, so a global package upgrade cannot silently break code that worked yesterday.
5 Build with checkpoints
Plan foundation, first draft, verification, and revision milestones. At each checkpoint, save evidence instead of relying on memory.
6 Present and continue
Present a working program, configuration, or technical walkthrough with a concise rationale. Use the final rubric to choose one strength to retain and one next practice target.
Visual modelCapstone learning loop
The capstone is a complete cycle: define a finishable brief, build, review evidence, then choose the next practice target.
Practice roundMatch the Software architecture vocabulary
Tap a term, then the definition it belongs to. Wrong guesses cost nothing but honesty.
Retrieval beats rereading: pulling a definition from memory strengthens it far more than recognizing it on the page.
- Clear the board once, shuffle, and beat your attempt count.
- Say each definition aloud before tapping — then check yourself.
Practice activity - 22 minComplete the capstone sprint
Create a complete Software architecture artifact for a defined audience and purpose, using the course rubric to review it.
- Write a brief with scope and success criteria.
- Create the first complete version.
- Run a self-check and request focused tutor feedback.
- Revise, present, and set one next-practice target.
DeliverableA finished capstone, evidence of one revision, and a next-practice note.
Success looks like- The result answers the brief.
- Course methods are visible.
- Revision follows feedback or evidence.
- The next step is specific and achievable.
Knowledge check1 questionWhen is the Software architecture capstone ready to finish?
Not startedSign in to save chapter notes to your account.