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
- Hint cell before cell 23: "What units does
np.cos() expect? Try np.cos(np.pi) vs np.cos(180)."
- Solution cell after cell 26: shows
theta_rad = np.deg2rad(theta_deg) and re-plots the corrected circle.
- 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.
- 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.
- (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
Goal
00_introduction/40_how_to_draw_a_circle.ipynbis 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 whosenp.cos(theta_deg)is wrong becausecosexpects radians. But the notebook never gives a hint or solution, so the exercise is open-ended and silent.Scope — 5 small edits
np.cos()expect? Trynp.cos(np.pi)vsnp.cos(180)."theta_rad = np.deg2rad(theta_deg)and re-plots the corrected circle.np.linspace(0, 360)→np.linspace(0, 360, num=?): surface thenumparameter so cell 27's "how many calculations?" question has a knob to vary.x = cos(aθ),y = sin(bθ), trya/b = 2/3.Z = -np.abs(...)makes the contour minimum trace the circle.Why
06_python_advanced/80_circle_case_study.ipynbper the restructure — content fixes go in first so the move is mechanical.Acceptance