Skip to content

Commit 337bf04

Browse files
committed
Update for sphinx-exercise
1 parent 895ac89 commit 337bf04

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lectures/writing_good_code.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ If you inspect this code, you will see that
296296

297297
## Exercises
298298

299-
### Exercise 1
299+
```{exercise-start}
300+
:label: wgc-exercise-1
301+
```
300302

301303
Here is some code that needs improving.
302304

@@ -414,9 +416,13 @@ a lot of repeated code here.
414416
Refactor and improve clarity in the code above using the principles discussed
415417
in this lecture.
416418

419+
```{exercise-end}
420+
```
421+
417422
## Solutions
418423

419-
### Exercise 1
424+
```{solution-start} wgc-exercise-1
425+
```
420426

421427
Here's one solution, that uses a class:
422428

@@ -487,3 +493,5 @@ eq.compute_equilibrium()
487493
eq.plot_equilibrium()
488494
```
489495

496+
```{solution-end}
497+
```

0 commit comments

Comments
 (0)