kangwonlee / kangwonlee/nmisp

Pedagogy: complete 00_introduction/40_how_to_draw_a_circle.ipynb (hint, solution, exercises)

Open
#397 0 comments 0 reactions 0 assignees View on GitHub
good first issue pedagogy
Dominant language
Jupyter Notebook
Stars
12
Forks
76
PR merge metrics
No merged PRs in 30d

Description

## Goal

`00_introduction/40_how_to_draw_a_circle.ipynb` is one of the strongest pedagogical notebooks in the chapter — same object expressed three ways (closed form, implicit, parametric). Cell 26 sets up an exercise ("Fix the figure above") referring to a parametric plot whose `np.cos(theta_deg)` is wrong because `cos` expects radians. But the notebook never gives a hint or solution, so the exercise is open-ended and silent.

## Scope — 5 small edits

1. **Hint cell before cell 23**: "What units does `np.cos()` expect? Try `np.cos(np.pi)` vs `np.cos(180)`."
2. **Solution cell after cell 26**: shows `theta_rad = np.deg2rad(theta_deg)` and re-plots the corrected circle.
3. **Cell 23 `np.linspace(0, 360)` → `np.linspace(0, 360, num=?)`**: surface the `num` parameter so cell 27's "how many calculations?" question has a knob to vary.
4. **Two follow-up exercises**:
- Draw an ellipse (a ≠ b), parametric form.
- Draw a Lissajous figure: `x = cos(aθ)`, `y = sin(bθ)`, try `a/b = 2/3`.
5. **(Optional) Cell 19**: one-line markdown explaining why `Z = -np.abs(...)` makes the contour minimum trace the circle.

## Why

- Closes a teaching loop the notebook already opened.
- Cheapest pedagogical win in the entire intro chapter (~6 cells added).
- Will eventually move to `06_python_advanced/80_circle_case_study.ipynb` per the restructure — content fixes go in first so the move is mechanical.

## Acceptance

- [ ] All 5 edits applied (item 5 optional).
- [ ] Notebook executes top-to-bottom.
- [ ] Solution cell shows the corrected output (visible circle, not garbage).
- [ ] Exercises have solution cells too.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.