Teaching with notebooks
Share a Python notebook with a class group, fold the solutions until students reveal them, and keep the lesson up to date. Honest about what is hidden and what is not.
A notebook is a good lesson: explanations, worked examples with real output and exercises, all in one note. This page shows how to share one with a class, fold the solutions, and what to expect.
What students can and cannot do
Students read the notebook: your text, your code and the results you saved. They do not run your code and they never download Python for it. Nothing runs in their browser except the page.
Students cannot change your notebook or your outputs.
A student can choose Save a copy to my space to keep a copy in their own space. They can run the copy only if their own plan includes notebooks.
Share a notebook with a class
You need the students to follow you first, then you put them in a group.
Create the group. Open your people page, choose the Groups tab and New group, for example "Spring cohort". Add the students with Add people. Only people who follow you can be added. See Followers and groups.
Write the lesson. Create a note and choose Notebook. Add text cells for explanations and code cells for examples. See Notebooks.
Run the cells that students should see results for. Outputs are saved with the note, and students see exactly those.
Fold the solutions. In an exercise's solution cell, open its menu and choose Hide as a solution until revealed. Students see Solution hidden. Try it yourself first. and a Reveal solution button.
Share with the group. Show the Settings panel, find Who can see this, choose Groups and pick the group. Confirm the change. Only members of that group can open the note.
Choose the views if the note also has page text or an app. See Views readers get.
Check what a student sees
Before you announce the lesson, view it as a student would:
Open the note's address in a private window signed in as a test student who follows you and is in the group, or ask a colleague you added to the group. A person outside the group gets nothing.
The note shows the notebook view. Folded cells show Solution hidden. Try it yourself first.. Cells with hidden code show the output with Show code.
Keep the lesson up to date
Because students read the live note, edit it and the group sees the change. Notebook history keeps earlier versions, so you can restore a lesson if an edit goes wrong. A student's saved copy is theirs and does not change.
Ideas that grow with your class
A graded quiz or sign-up: a Studio app can record answers and scores for the class with its own database, shared with the same group. See App ideas.
A cohort course you sell: put the notebooks in a collection and sell access with updates. See Sell a course.
Related
Step by step: Teach a class with a notebook