From bf86d0593c87f88ad30586ecb85388adfe7f1424 Mon Sep 17 00:00:00 2001 From: f8dc60cab5180566667b00ce62a51ae7 Date: Thu, 12 Jun 2025 22:46:38 +0000 Subject: [PATCH] Exercise 2.1, notebook commited --- module2/exo1/.ipynb | 96 +++++++++++++++++++++++++++++++++ module2/exo1/toy_notebook.ipynb | 96 +++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+) create mode 100644 module2/exo1/.ipynb create mode 100644 module2/exo1/toy_notebook.ipynb diff --git a/module2/exo1/.ipynb b/module2/exo1/.ipynb new file mode 100644 index 0000000..4991711 --- /dev/null +++ b/module2/exo1/.ipynb @@ -0,0 +1,96 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.8" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def f(x,y):\n", + " if y != 0:\n", + " return x/y\n", + " else:\n", + " return x/(y+1e-9)\n", + "\n", + "f(4,5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\\int_0^\\infty e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Partie 1: Creation of the list" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**A bullet list:**\n", + "\n", + "- the first element:\n", + " - water\n", + " - LNAPL\n", + " \n", + "- the second element:\n", + " - SER\n", + " - MSS\n", + "\n", + "**A numbered list:**\n", + "\n", + "1. the first element;\n", + "2. the second element" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# A code block\n", + "\n", + "print(\"Hello, world!\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/module2/exo1/toy_notebook.ipynb b/module2/exo1/toy_notebook.ipynb new file mode 100644 index 0000000..4991711 --- /dev/null +++ b/module2/exo1/toy_notebook.ipynb @@ -0,0 +1,96 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.8" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def f(x,y):\n", + " if y != 0:\n", + " return x/y\n", + " else:\n", + " return x/(y+1e-9)\n", + "\n", + "f(4,5)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$$\\int_0^\\infty e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}$$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Partie 1: Creation of the list" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**A bullet list:**\n", + "\n", + "- the first element:\n", + " - water\n", + " - LNAPL\n", + " \n", + "- the second element:\n", + " - SER\n", + " - MSS\n", + "\n", + "**A numbered list:**\n", + "\n", + "1. the first element;\n", + "2. the second element" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# A code block\n", + "\n", + "print(\"Hello, world!\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} -- 2.18.1