From dc77520a83afce718ab7b3e963e1c9dea998b615 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Thu, 10 Apr 2025 10:25:56 +0200 Subject: [PATCH 1/4] remove exercise numbering --- book/flow/Exercises/01.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/book/flow/Exercises/01.ipynb b/book/flow/Exercises/01.ipynb index dbb6469..12df000 100644 --- a/book/flow/Exercises/01.ipynb +++ b/book/flow/Exercises/01.ipynb @@ -56,7 +56,7 @@ } }, "source": [ - "## Exercise 2.2.1\n", + "## Exercise\n", "\n", "One of the most crucial applications of if statements is filtering the data from errors and checking whether an error is within a certain limit.\n", "\n", @@ -166,7 +166,7 @@ } }, "source": [ - "## (Searching) Exercise 2.2.4\n", + "## (Searching) Exercise\n", "\n", "Conditional expression is a way how one can compress an if statement to a more compact (and logical) statement. Your task is to rewrite the below if statement by using the 'conditional expression' technique." ] @@ -289,7 +289,7 @@ } }, "source": [ - "## Exercise 2.4.3\n", + "## Exercise\n", "\n", "Here you need to write a function that is able to sort any list consisting only of real numbers, in the descending order. For example, the list $[19, 5, 144, 6]$ becomes $[144, 19, 6, 5]$. However there are three possible options to complete correctly the code where the dots `...` are placed.\n", "\n", @@ -332,7 +332,7 @@ } }, "source": [ - "## Exercise 2.4.5\n", + "## Exercise\n", "\n", "In this exercise you will perform downsampling of a provided 'regular' 2D list. Downsampling is a procedure where only a subset of the data is sampled (to reduce its size, for example). Below a visual aid of what downsampling of a 2D list is. Instead of using all the data available, your task is to downsample the 2D list to keep only the data of every $a$-th row and every $b$-th column, including the first element $(a_{0,0})$.

$$A = \\left[\\begin{array}{ccccc}\n", "a_{0,0} & \\dots & a_{0,b} & \\dots & a_{0,2b} & \\dots & \\dots & a_{0,nb}\t& \\dots\\\\\n", From 1dfd9ebec2b66453a8c123e649c39c0373f73512 Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Thu, 10 Apr 2025 10:27:20 +0200 Subject: [PATCH 2/4] add unique id for exercise --- book/flow/Exercises/01.ipynb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/book/flow/Exercises/01.ipynb b/book/flow/Exercises/01.ipynb index 12df000..ea30d50 100644 --- a/book/flow/Exercises/01.ipynb +++ b/book/flow/Exercises/01.ipynb @@ -57,6 +57,7 @@ }, "source": [ "## Exercise\n", + "% was exercise 2.2.1\n", "\n", "One of the most crucial applications of if statements is filtering the data from errors and checking whether an error is within a certain limit.\n", "\n", @@ -167,6 +168,7 @@ }, "source": [ "## (Searching) Exercise\n", + "% was exercise 2.2.4\n", "\n", "Conditional expression is a way how one can compress an if statement to a more compact (and logical) statement. Your task is to rewrite the below if statement by using the 'conditional expression' technique." ] @@ -290,6 +292,7 @@ }, "source": [ "## Exercise\n", + "% was exercise 2.4.3\n", "\n", "Here you need to write a function that is able to sort any list consisting only of real numbers, in the descending order. For example, the list $[19, 5, 144, 6]$ becomes $[144, 19, 6, 5]$. However there are three possible options to complete correctly the code where the dots `...` are placed.\n", "\n", From e912687b91e92c70ae8e78b8dea4a2180fd6065f Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Thu, 10 Apr 2025 10:28:41 +0200 Subject: [PATCH 3/4] add note about id tags --- docs/quizzes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quizzes.md b/docs/quizzes.md index bfb3103..721a43e 100644 --- a/docs/quizzes.md +++ b/docs/quizzes.md @@ -5,4 +5,4 @@ Prior to 2024 the book used Jupyter Quiz, which is based on JSON files. These ar To make the change transparent, and possible support future conversion in case H5p is no longer supported, the following actions were taken: 1. A tag was added to the import statement in the Python cell, `# jupyterquiz-import`. If all exercises in a page are converted, the entire cell can be commented out (but should remain in the notebook with cell tag `remove-input`) 2. A cell containing a Jupyter Quiz exercises should have a tag of the form: `# jupyterquiz-exercise-x-y-z` where `x`, `y`, and `z` are the chapter, section, and exercise numbers (as they appeared in the original book and Jupyter Quiz question number), respectively. This tag should be added to the cell containing the exercise prompt, and the cell tag `remove-input` should remain in place. -3. H5p exercises are created and stored on the TU Delft H5P platform, accessible at https://tudelft.h5p.com/content. Each exercise is assigned a unique identifier on this platform, which is correlated with the original Jupyter Quiz exercise tags. \ No newline at end of file +3. H5p exercises are created and stored on the TU Delft H5P platform, accessible at https://tudelft.h5p.com/content. Each exercise is assigned a unique identifier on this platform (format `X.Y.Z`), which is correlated with the original Jupyter Quiz exercise tags. The id's were removed from the exercise header text as they are now automatically numbered in the toc, so the `X.Y.Z` id is presered in a comment under the header. \ No newline at end of file From 4ec7488cac2a12ad03578825021f8afd353aeeef Mon Sep 17 00:00:00 2001 From: Robert Lanzafame Date: Thu, 10 Apr 2025 10:33:50 +0200 Subject: [PATCH 4/4] module to modules --- book/_toc.yml | 8 ++++---- book/{module => modules}/Exercises/01.ipynb | 0 book/{module => modules}/Exercises/01.json | 0 book/{module => modules}/modules.ipynb | 0 book/{module => modules}/nutshell.md | 0 book/{module => modules}/nutshell/modules.ipynb | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename book/{module => modules}/Exercises/01.ipynb (100%) rename book/{module => modules}/Exercises/01.json (100%) rename book/{module => modules}/modules.ipynb (100%) rename book/{module => modules}/nutshell.md (100%) rename book/{module => modules}/nutshell/modules.ipynb (100%) diff --git a/book/_toc.yml b/book/_toc.yml index c9f03d2..d7d5ba6 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -52,9 +52,9 @@ parts: - file: modules.md title: Modules sections: - - file: module/modules.ipynb + - file: modules/modules.ipynb title: Modules - - file: module/Exercises/01.ipynb + - file: modules/Exercises/01.ipynb - file: 05/Theory/01.ipynb sections: - file: 05/Exercises/01.ipynb @@ -108,10 +108,10 @@ parts: sections: - file: objects/nutshell/object.ipynb title: Objects and References - - file: module/nutshell.md + - file: modules/nutshell.md title: Modules sections: - - file: module/nutshell/modules.ipynb + - file: modules/nutshell/modules.ipynb title: Modules - file: 04/In_a_Nutshell/01.ipynb - file: 05/In_a_Nutshell/01.ipynb diff --git a/book/module/Exercises/01.ipynb b/book/modules/Exercises/01.ipynb similarity index 100% rename from book/module/Exercises/01.ipynb rename to book/modules/Exercises/01.ipynb diff --git a/book/module/Exercises/01.json b/book/modules/Exercises/01.json similarity index 100% rename from book/module/Exercises/01.json rename to book/modules/Exercises/01.json diff --git a/book/module/modules.ipynb b/book/modules/modules.ipynb similarity index 100% rename from book/module/modules.ipynb rename to book/modules/modules.ipynb diff --git a/book/module/nutshell.md b/book/modules/nutshell.md similarity index 100% rename from book/module/nutshell.md rename to book/modules/nutshell.md diff --git a/book/module/nutshell/modules.ipynb b/book/modules/nutshell/modules.ipynb similarity index 100% rename from book/module/nutshell/modules.ipynb rename to book/modules/nutshell/modules.ipynb