From 92b864c4086d1c4d7f900d429b1037f83620f83d Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Sat, 21 Dec 2024 11:07:04 +0100 Subject: [PATCH] Adapt the change exercise arguments in PR #108 also in doc --- docs/src/check.ipynb | 10 +++++----- docs/src/exercises.ipynb | 4 ++-- docs/src/getting_started.ipynb | 4 ++-- docs/src/nbgrader.ipynb | 20 ++++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/src/check.ipynb b/docs/src/check.ipynb index 160baf0..27243de 100644 --- a/docs/src/check.ipynb +++ b/docs/src/check.ipynb @@ -89,7 +89,7 @@ "\n", "\n", "check_code_ex = CodeExercise(\n", - " exercise_key=\"sinus_with_references_1\",\n", + " key=\"sinus_with_references_1\",\n", " code=sin,\n", " check_registry=check_registry,\n", ")\n", @@ -146,7 +146,7 @@ "code_input_sinus = CodeInput(sinus)\n", "\n", "check_code_ex = CodeExercise(\n", - " exercise_key=\"sinus_with_references_2\",\n", + " key=\"sinus_with_references_2\",\n", " code=code_input_sinus,\n", " check_registry=check_registry,\n", ")\n", @@ -234,7 +234,7 @@ "code_input_sinus = CodeInput(sinus)\n", "\n", "check_code_ex = CodeExercise(\n", - " exercise_key=\"sinus_functional_behavior\",\n", + " key=\"sinus_functional_behavior\",\n", " code=code_input_sinus,\n", " check_registry=check_registry,\n", ")\n", @@ -291,7 +291,7 @@ "code_input_sinus = CodeInput(riddle)\n", "\n", "check_code_ex = CodeExercise(\n", - " exercise_key=\"riddle\",\n", + " key=\"riddle\",\n", " code=code_input_sinus,\n", " check_registry=check_registry,\n", ")\n", @@ -392,7 +392,7 @@ " return arr\n", "\n", "check_code_ex = CodeExercise(\n", - " exercise_key=\"will_raise_error\",\n", + " key=\"will_raise_error\",\n", " code=error,\n", " check_registry=check_registry,\n", ")\n", diff --git a/docs/src/exercises.ipynb b/docs/src/exercises.ipynb index 02b8786..2144e3e 100644 --- a/docs/src/exercises.ipynb +++ b/docs/src/exercises.ipynb @@ -114,8 +114,8 @@ "outputs": [], "source": [ "TextExercise(\n", - " exercise_title=\"Exercise 01: Derive a solution for weights\",\n", - " exercise_description=\"\"\"\n", + " title=\"Exercise 01: Derive a solution for weights\",\n", + " description=\"\"\"\n", " We can define ridge regression by extending the ordinary least\n", " square solution by a penalization $\\lambda\\|\\mathbf{w}\\|_2^2$. Please derive the solution\n", " for the weights from the optimization problem:

\n", diff --git a/docs/src/getting_started.ipynb b/docs/src/getting_started.ipynb index 7df694b..d8bfd7e 100644 --- a/docs/src/getting_started.ipynb +++ b/docs/src/getting_started.ipynb @@ -88,8 +88,8 @@ " parameters={\"omega\": (0.5, 3.14, 0.1)},\n", " update=update_func,\n", " update_mode=\"continuous\",\n", - " exercise_title=\"Sinus function\",\n", - " exercise_description=\"Implements $\\sin(x\\omega)$\",\n", + " title=\"Sinus function\",\n", + " description=\"Implements $\\sin(x\\omega)$\",\n", ")\n", "\n", "code_ex.run_update() # For the demonstration we run the widget one time\n", diff --git a/docs/src/nbgrader.ipynb b/docs/src/nbgrader.ipynb index aec8b88..3edf65a 100644 --- a/docs/src/nbgrader.ipynb +++ b/docs/src/nbgrader.ipynb @@ -166,7 +166,7 @@ " return [i ** 2 for i in range(1, n + 1)]\n", " ### END SOLUTION\n", "\n", - "exercise_description = \"\"\"\n", + "description = \"\"\"\n", "Write a function that returns a list of numbers,\n", "such that $x_i=i^2$, for $1\\leq i \\leq n$.\n", "Make sure it handles the case where $n<1$ by raising a `ValueError`.\n", @@ -179,7 +179,7 @@ " check_registry=check_registry,\n", " exercise_registry=exercise_registry,\n", " key=\"Part A (2 points)\",\n", - " description=exercise_description\n", + " description=description\n", ")\n", "\n", "# Check that squares returns the correct output for several inputs\n", @@ -286,7 +286,7 @@ " return sum(squares(n))\n", " ### END SOLUTION\n", "\n", - "exercise_description = \"\"\"\n", + "description = \"\"\"\n", "Using your `squares` function, write a function\n", "that computes the sum of the squares of the numbers\n", "from 1 to $n$. Your function should call the `squares`\n", @@ -300,7 +300,7 @@ " check_registry=check_registry,\n", " exercise_registry=exercise_registry,\n", " key=\"Part B (1 point)\",\n", - " description=exercise_description\n", + " description=description\n", ")\n", "\n", "# Check that sum_of_squares returns the correct answer for various inputs\n", @@ -402,7 +402,7 @@ "### END SOLUTION\n", "\"\"\"\n", "\n", - "exercise_description = \"\"\"\n", + "description = \"\"\"\n", "Using LaTeX math notation, write out the equation\n", "that is implemented by your `sum_of_squares` function.\"\"\"\n", "\n", @@ -410,7 +410,7 @@ " value=value,\n", " exercise_registry=exercise_registry,\n", " key=\"Part C (1 point)\",\n", - " description=exercise_description\n", + " description=description\n", ")\n", "text_ex" ] @@ -459,7 +459,7 @@ " ### BEGIN SOLUTION\n", " ### END SOLUTION\n", "\n", - "exercise_description = \"\"\"\n", + "description = \"\"\"\n", "Find a usecase for your `sum_of_squares` function and implement that usecase in the cell below.\n", "\"\"\"\n", "\n", @@ -469,7 +469,7 @@ " update=lambda code_ex: print(code_ex.code(code_ex.parameters['n'])),\n", " exercise_registry=exercise_registry,\n", " key=\"Part D (2 points)\",\n", - " description=exercise_description\n", + " description=description\n", ")\n", "\n", "code_ex_pyramidal_number" @@ -513,7 +513,7 @@ }, "outputs": [], "source": [ - "exercise_description = \"\"\"\n", + "description = \"\"\"\n", "State the formulae for an arithmetic and geometric\n", "sum and verify them numerically for an example of\n", "your choice.\"\"\"\n", @@ -525,7 +525,7 @@ "\"\"\",\n", " exercise_registry=exercise_registry,\n", " key=\"Part E (4 points)\",\n", - " description=exercise_description\n", + " description=description\n", ")\n", "\n", "text_ex"