Skip to content

Commit 444994b

Browse files
authored
Adapt the change exercise arguments in PR #108 also in doc (#111)
1 parent eec8088 commit 444994b

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

docs/src/check.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"\n",
9090
"\n",
9191
"check_code_ex = CodeExercise(\n",
92-
" exercise_key=\"sinus_with_references_1\",\n",
92+
" key=\"sinus_with_references_1\",\n",
9393
" code=sin,\n",
9494
" check_registry=check_registry,\n",
9595
")\n",
@@ -146,7 +146,7 @@
146146
"code_input_sinus = CodeInput(sinus)\n",
147147
"\n",
148148
"check_code_ex = CodeExercise(\n",
149-
" exercise_key=\"sinus_with_references_2\",\n",
149+
" key=\"sinus_with_references_2\",\n",
150150
" code=code_input_sinus,\n",
151151
" check_registry=check_registry,\n",
152152
")\n",
@@ -234,7 +234,7 @@
234234
"code_input_sinus = CodeInput(sinus)\n",
235235
"\n",
236236
"check_code_ex = CodeExercise(\n",
237-
" exercise_key=\"sinus_functional_behavior\",\n",
237+
" key=\"sinus_functional_behavior\",\n",
238238
" code=code_input_sinus,\n",
239239
" check_registry=check_registry,\n",
240240
")\n",
@@ -291,7 +291,7 @@
291291
"code_input_sinus = CodeInput(riddle)\n",
292292
"\n",
293293
"check_code_ex = CodeExercise(\n",
294-
" exercise_key=\"riddle\",\n",
294+
" key=\"riddle\",\n",
295295
" code=code_input_sinus,\n",
296296
" check_registry=check_registry,\n",
297297
")\n",
@@ -392,7 +392,7 @@
392392
" return arr\n",
393393
"\n",
394394
"check_code_ex = CodeExercise(\n",
395-
" exercise_key=\"will_raise_error\",\n",
395+
" key=\"will_raise_error\",\n",
396396
" code=error,\n",
397397
" check_registry=check_registry,\n",
398398
")\n",

docs/src/exercises.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@
114114
"outputs": [],
115115
"source": [
116116
"TextExercise(\n",
117-
" exercise_title=\"Exercise 01: Derive a solution for weights\",\n",
118-
" exercise_description=\"\"\"\n",
117+
" title=\"Exercise 01: Derive a solution for weights\",\n",
118+
" description=\"\"\"\n",
119119
" We can define ridge regression by extending the ordinary least\n",
120120
" square solution by a penalization $\\lambda\\|\\mathbf{w}\\|_2^2$. Please derive the solution\n",
121121
" for the weights from the optimization problem:</p>\n",

docs/src/getting_started.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
" parameters={\"omega\": (0.5, 3.14, 0.1)},\n",
8989
" update=update_func,\n",
9090
" update_mode=\"continuous\",\n",
91-
" exercise_title=\"Sinus function\",\n",
92-
" exercise_description=\"Implements $\\sin(x\\omega)$\",\n",
91+
" title=\"Sinus function\",\n",
92+
" description=\"Implements $\\sin(x\\omega)$\",\n",
9393
")\n",
9494
"\n",
9595
"code_ex.run_update() # For the demonstration we run the widget one time\n",

docs/src/nbgrader.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
" return [i ** 2 for i in range(1, n + 1)]\n",
167167
" ### END SOLUTION\n",
168168
"\n",
169-
"exercise_description = \"\"\"\n",
169+
"description = \"\"\"\n",
170170
"Write a function that returns a list of numbers,\n",
171171
"such that $x_i=i^2$, for $1\\leq i \\leq n$.\n",
172172
"Make sure it handles the case where $n<1$ by raising a `ValueError`.\n",
@@ -179,7 +179,7 @@
179179
" check_registry=check_registry,\n",
180180
" exercise_registry=exercise_registry,\n",
181181
" key=\"Part A (2 points)\",\n",
182-
" description=exercise_description\n",
182+
" description=description\n",
183183
")\n",
184184
"\n",
185185
"# Check that squares returns the correct output for several inputs\n",
@@ -286,7 +286,7 @@
286286
" return sum(squares(n))\n",
287287
" ### END SOLUTION\n",
288288
"\n",
289-
"exercise_description = \"\"\"\n",
289+
"description = \"\"\"\n",
290290
"Using your `squares` function, write a function\n",
291291
"that computes the sum of the squares of the numbers\n",
292292
"from 1 to $n$. Your function should call the `squares`\n",
@@ -300,7 +300,7 @@
300300
" check_registry=check_registry,\n",
301301
" exercise_registry=exercise_registry,\n",
302302
" key=\"Part B (1 point)\",\n",
303-
" description=exercise_description\n",
303+
" description=description\n",
304304
")\n",
305305
"\n",
306306
"# Check that sum_of_squares returns the correct answer for various inputs\n",
@@ -402,15 +402,15 @@
402402
"### END SOLUTION\n",
403403
"\"\"\"\n",
404404
"\n",
405-
"exercise_description = \"\"\"\n",
405+
"description = \"\"\"\n",
406406
"Using LaTeX math notation, write out the equation\n",
407407
"that is implemented by your `sum_of_squares` function.\"\"\"\n",
408408
"\n",
409409
"text_ex = TextExercise(\n",
410410
" value=value,\n",
411411
" exercise_registry=exercise_registry,\n",
412412
" key=\"Part C (1 point)\",\n",
413-
" description=exercise_description\n",
413+
" description=description\n",
414414
")\n",
415415
"text_ex"
416416
]
@@ -459,7 +459,7 @@
459459
" ### BEGIN SOLUTION\n",
460460
" ### END SOLUTION\n",
461461
"\n",
462-
"exercise_description = \"\"\"\n",
462+
"description = \"\"\"\n",
463463
"Find a usecase for your `sum_of_squares` function and implement that usecase in the cell below.\n",
464464
"\"\"\"\n",
465465
"\n",
@@ -469,7 +469,7 @@
469469
" update=lambda code_ex: print(code_ex.code(code_ex.parameters['n'])),\n",
470470
" exercise_registry=exercise_registry,\n",
471471
" key=\"Part D (2 points)\",\n",
472-
" description=exercise_description\n",
472+
" description=description\n",
473473
")\n",
474474
"\n",
475475
"code_ex_pyramidal_number"
@@ -513,7 +513,7 @@
513513
},
514514
"outputs": [],
515515
"source": [
516-
"exercise_description = \"\"\"\n",
516+
"description = \"\"\"\n",
517517
"State the formulae for an arithmetic and geometric\n",
518518
"sum and verify them numerically for an example of\n",
519519
"your choice.\"\"\"\n",
@@ -525,7 +525,7 @@
525525
"\"\"\",\n",
526526
" exercise_registry=exercise_registry,\n",
527527
" key=\"Part E (4 points)\",\n",
528-
" description=exercise_description\n",
528+
" description=description\n",
529529
")\n",
530530
"\n",
531531
"text_ex"

0 commit comments

Comments
 (0)