File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -355,11 +355,13 @@ Use no import besides `from numpy.random import uniform`.
355355
356356## Solutions
357357
358- ```` {solution} exercise_1
358+ ``` {solution} exercise_1
359359:label: solution_1
360360
361361Here's one solution.
362362
363+ ```
364+
363365``` {code-cell} python3
364366def factorial(n):
365367 k = 1
@@ -369,10 +371,10 @@ def factorial(n):
369371
370372factorial(4)
371373```
372- ````
373374
374375```` {solution} exercise_2
375376:label: solution_2
377+ ````
376378
377379``` {code-cell} python3
378380from numpy.random import uniform
@@ -387,12 +389,12 @@ def binomial_rv(n, p):
387389
388390binomial_rv(10, 0.5)
389391```
390- ````
391392
392- ```` {solution} exercise_3
393+ ``` {solution} exercise_3
393394:label: solution_3
394395
395396Here's a function for the first random device.
397+ ```
396398
397399``` {code-cell} python3
398400from numpy.random import uniform
@@ -414,7 +416,9 @@ def draw(k): # pays if k consecutive successes in a sequence
414416draw(3)
415417```
416418
419+ ``` {solution} exercise_3
417420Here's another function for the second random device.
421+ ```
418422
419423``` {code-cell} python3
420424def draw_new(k): # pays if k successes in a sequence
@@ -433,4 +437,4 @@ def draw_new(k): # pays if k successes in a sequence
433437
434438draw_new(3)
435439```
436- ````
440+
You can’t perform that action at this time.
0 commit comments