The Life Starter
0 of 6 complete0%
Course Library · Lesson 5 of 6
Digital · Guided lesson

Rerun from a clean session

About 31 minutes · 6 reading + 25 practice and checks
Time includes reading, practice, and questions. Extra videos or further study are optional.
See this course’s project requirements

An executable notebook and script that regenerate checked attendance totals, with raw data, an exclusion log, a data dictionary and a controlled rerun.

Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.

What to include

  • Question and inclusion rules.
  • Preserved input and four-field dictionary.
  • Executable analysis with exclusion reasons.
  • Checked site/total reconciliation and interpretation.
  • Clean-session baseline, correction test and complete handoff.

Review and revise

Use these criteria to check your work and choose what to improve.

  • The stated metric matches the code.
  • Exclusions and guards are explicit.
  • Clean runs reproduce expected totals.
  • The package contains enough information to rerun and interpret it.
Open the full course project
Want more background?
Before you begin

The idea in everyday life

Rebuild a fictional attendance result from preserved data and executable steps.

The idea

A clean-session run tests whether saved inputs and code are sufficient.

Follow along

Rerun from a clean session — guided practice

Regenerate results without relying on hidden notebook state.

Use free local JupyterLab with a Python 3 kernel, or an equivalent notebook environment that can read uploaded local files. Put analysis.ipynb and attendance.csv in the same new practice folder; no extra Python packages are used by the analysis. The CSV rows are S1 north 8 held; S2 south 6 held; S3 north blank held; S4 south 0 canceled; S5 north 7 held; S6 south 5 held; S7 north 4 held; S8 south 9 held. The supplied analyze.py runs the same calculation with Python from this folder. Use only these fictional records.

  1. 1. Restore the baseline

    Ensure S1 is 8 and S3 remains blank. Save the notebook.

    You should see: The exact base CSV is restored.

    Earlier experiments should not silently alter this test.

  2. 2. Restart and run

    Use the notebook kernel menu to restart the Python kernel, then run all cells from top to bottom.

    You should see: The baseline outputs regenerate as 8/6/2 and total 39.

    Restarting removes variables left in memory from prior runs.

  3. 3. Replay independently

    From the same folder run python analyze.py, or compare another clean notebook run if a terminal is unavailable.

    You should see: The script prints the same counts and totals.

    Independent execution checks the saved workflow, not just displayed old output.

  4. 4. Record environment

    Save the printed Python version, the input_sha256 value from output/result.json, and the run date in README.md.

    You should see: A future reviewer can compare environment and exact input.

    A hash identifies content; it does not prove that content is accurate.

Now change one thing

A notebook uses a variable created only in an earlier unsaved session. After restart, enter present or absent for that variable.

Your work

What to finish

A clean-run record with Python version and input identity.

Common mistake

Watch for this

Running only a final cell that depends on variables created in an unsaved earlier experiment.

How can I tell I understand it?

Complete the changed case, explain your result, and pass the three application checks.

Try 3 questions

Quick knowledge check

Answer all 3 questions. Get at least 2 right and the lesson completes automatically.

Not yet passed

You’ll get an explanation for each answer. Signed in? Your results save to your account.

1A notebook works until its kernel is restarted. What likely dependency was hidden?
2A content hash changes after one data value is edited. What does that show?
3Which replay is strongest evidence of a self-contained notebook?
0 of 3 answeredApply the lesson to a short question, then review the explanation.
5
Finish this lesson

Pass the check. We’ll save the progress.

Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.

Go to the knowledge check
Optional course overview video · same video as Lesson 1
Corey SchaferJupyter Notebook Tutorial: Introduction, Setup, and WalkthroughYouTube
Optional course overview

Jupyter Notebook Tutorial: Introduction, Setup, and Walkthrough

From Corey Schafer. Watch here or open it on YouTube .

Optional course overview. Follow the written steps below at your own pace.
Tools, templates, and lesson sources

Tools and templates

Tools open in a new tab so you can keep your place here.

Sources and further reading

Explore the references behind this lesson.

JupyterLab: Notebooks
Source & access notes · checked 2026-09-12

Opened and inspected on 2026-09-12: Code, Markdown and notebook execution.

Access: Free public web page; no paid enrollment required.

Reuse: Public reference; link only. LifeStarter prose, exercises and files are independently authored.

Reproducible Science Curriculum: Data and Project Organization
Source & access notes · checked 2026-09-12

Opened and inspected on 2026-09-12: Directory structure, metadata and project handoff.

Access: Free public web page; no paid enrollment required.

Reuse: The linked curriculum license page identifies instructional material as CC BY 4.0. Link only; LifeStarter data, code and explanations are independently authored.

Report a problem with this lesson

Tell us what went wrong. Please leave out personal information and private project contents.

No sign-in needed.