Improve julia_basics.ipynb

This commit is contained in:
Noorts 2023-09-08 11:51:40 +02:00
parent fd3349e54a
commit 71fd8cad72
No known key found for this signature in database
GPG Key ID: 49D80B7D44C852D4

View File

@ -43,9 +43,9 @@
"<b>Tip:</b> Did you know that Jupyter stands for Julia, Python and R?\n", "<b>Tip:</b> Did you know that Jupyter stands for Julia, Python and R?\n",
"</div>\n", "</div>\n",
"\n", "\n",
"### How to start a Jupyter nootebook in Julia\n", "### How to start a Jupyter notebook in Julia\n",
"\n", "\n",
"To run a Julia Jupyther notebook, open a Julia REPL and type\n", "To run a Julia Jupyter notebook, open a Julia REPL and type\n",
"\n", "\n",
"```julia\n", "```julia\n",
"julia> ]\n", "julia> ]\n",
@ -449,7 +449,7 @@
"source": [ "source": [
"\n", "\n",
"<div class=\"alert alert-block alert-success\">\n", "<div class=\"alert alert-block alert-success\">\n",
"<b>Question:</b> Which will be the value of `x` in the last line ? (Think your answer before executing next cell to find out the result) \n", "<b>Question:</b> What will be the value of `x` in the last line ? (Think your answer before executing next cell to find out the result) \n",
"</div>\n", "</div>\n",
"\n" "\n"
] ]
@ -478,7 +478,7 @@
"\n", "\n",
"### Defining functions\n", "### Defining functions\n",
"\n", "\n",
"Functions are defined as shown in next cell. The closing `end` is necessary. Do to forget it! However, the `return` is optional. The value of last line is returned by default. Indentation is recommended, but it is also optional. That's why the closing `end` is needed." "Functions are defined as shown in next cell. The closing `end` is necessary. Do not forget it! However, the `return` is optional. The value of last line is returned by default. Indentation is recommended, but it is also optional. That's why the closing `end` is needed."
] ]
}, },
{ {
@ -538,7 +538,7 @@
"id": "e4ca76a4", "id": "e4ca76a4",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Mathematical operators can also be broadcasted (like in Matlab). The following cell won't work. If we want to multiply element by element, we can use the broadcasted version below." "Mathematical operators can also be broadcasted (like in Matlab). Multiplying the vectors `a * b` directly won't work. If we want to multiply element by element, we can use the broadcasted version below."
] ]
}, },
{ {
@ -557,7 +557,7 @@
"metadata": {}, "metadata": {},
"source": [ "source": [
"<div class=\"alert alert-block alert-success\">\n", "<div class=\"alert alert-block alert-success\">\n",
"<b>Question:</b> Which will be the value of `x` in the last line ?\n", "<b>Question:</b> What will be the value of `x` in the last line ?\n",
"</div>\n" "</div>\n"
] ]
}, },
@ -1300,7 +1300,7 @@
"source": [ "source": [
"### Arrays of any element type\n", "### Arrays of any element type\n",
"\n", "\n",
"Arrays of fixed element type seem to be very rigid, right? Python list have not this limitation. However, we can use arrays of `Any` type, which are as flexible as Python lists, or even more since they can also contain functions. " "Arrays of fixed element type seem to be very rigid, right? Python list do not this limitation. However, we can use arrays of the `Any` type, which are as flexible as Python lists, or even more since they can also contain functions. "
] ]
}, },
{ {