diff --git a/open-machine-learning-jupyter-book/prerequisites/python-programming-advanced.ipynb b/open-machine-learning-jupyter-book/prerequisites/python-programming-advanced.ipynb index 1a3638fd1..219f1c55e 100644 --- a/open-machine-learning-jupyter-book/prerequisites/python-programming-advanced.ipynb +++ b/open-machine-learning-jupyter-book/prerequisites/python-programming-advanced.ipynb @@ -15,7 +15,7 @@ "\n", "import sys\n", "import os\n", - "!{sys.executable} -m pip install --quiet jupyterlab_myst ipython" + "!{sys.executable} -m pip install --quiet jupyterlab_myst ipython pytest" ] }, { diff --git a/open-machine-learning-jupyter-book/prerequisites/python-programming-basics.ipynb b/open-machine-learning-jupyter-book/prerequisites/python-programming-basics.ipynb index e174ca9b7..d277e404e 100644 --- a/open-machine-learning-jupyter-book/prerequisites/python-programming-basics.ipynb +++ b/open-machine-learning-jupyter-book/prerequisites/python-programming-basics.ipynb @@ -1,5 +1,19 @@ { "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "16159125", + "metadata": {}, + "outputs": [], + "source": [ + "# Install the necessary dependencies\n", + "\n", + "import sys\n", + "import os\n", + "!{sys.executable} -m pip install --quiet jupyterlab_myst ipython" + ] + }, { "cell_type": "markdown", "id": "dcca180d", @@ -4731,7 +4745,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.9.18" } }, "nbformat": 4, diff --git a/open-machine-learning-jupyter-book/prerequisites/python-programming-introduction.ipynb b/open-machine-learning-jupyter-book/prerequisites/python-programming-introduction.ipynb index 0b321110f..4f8bf002a 100644 --- a/open-machine-learning-jupyter-book/prerequisites/python-programming-introduction.ipynb +++ b/open-machine-learning-jupyter-book/prerequisites/python-programming-introduction.ipynb @@ -1,5 +1,19 @@ { "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "55db1b3f", + "metadata": {}, + "outputs": [], + "source": [ + "# Install the necessary dependencies\n", + "\n", + "import sys\n", + "import os\n", + "!{sys.executable} -m pip install --quiet jupyterlab_myst ipython" + ] + }, { "cell_type": "markdown", "id": "3d063176", @@ -21,6 +35,57 @@ "---" ] }, + { + "cell_type": "markdown", + "id": "6959d225", + "metadata": {}, + "source": [ + "
\n", + "\n", + "LICENSE\n", + "\n", + "MIT License\n", + "\n", + "Copyright (c) 2018 Oleksii Trekhleb\n", + "Copyright (c) 2018 Real Python\n", + "\n", + "Permission is hereby granted, free of charge, to any person obtaining a copy\n", + "of this software and associated documentation files (the \"Software\"), to deal\n", + "in the Software without restriction, including without limitation the rights\n", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n", + "copies of the Software, and to permit persons to whom the Software is\n", + "furnished to do so, subject to the following conditions:\n", + "\n", + "The above copyright notice and this permission notice shall be included in all\n", + "copies or substantial portions of the Software.\n", + "\n", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n", + "SOFTWARE.\n", + "\n", + "
\n", + "\n", + "# Python programming basics\n", + "\n", + "## Python syntax\n", + "\n", + "**Python syntax compared to other programming languages**\n", + "\n", + "- Python was designed for readability and has some similarities to the English language with influence from mathematics.\n", + "- Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.\n", + "- Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly brackets for this purpose.\n", + "\n", + "### Python indentations\n", + "\n", + "While in other programming languages the indentation in code is for readability only, in Python the indentation is very important.\n", + "\n", + "Python uses indentation to indicate a block of code." + ] + }, { "attachments": {}, "cell_type": "markdown",