From 4b8aae1f28e9948848e81f7fb6b8744938282951 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Sun, 8 Mar 2020 17:46:19 +0100 Subject: [PATCH] Streamline presentation --- 01_elements_01_review.ipynb | 2 +- 02_functions_00_lecture.ipynb | 360 ++++++++++++++++++-------------- 02_functions_01_review.ipynb | 2 +- 02_functions_02_exercises.ipynb | 4 +- 4 files changed, 211 insertions(+), 157 deletions(-) diff --git a/01_elements_01_review.ipynb b/01_elements_01_review.ipynb index 0ed455c..c17b487 100644 --- a/01_elements_01_review.ipynb +++ b/01_elements_01_review.ipynb @@ -207,7 +207,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.6" }, "toc": { "base_numbering": 1, diff --git a/02_functions_00_lecture.ipynb b/02_functions_00_lecture.ipynb index 69170d8..c25b194 100644 --- a/02_functions_00_lecture.ipynb +++ b/02_functions_00_lecture.ipynb @@ -134,7 +134,7 @@ { "data": { "text/plain": [ - "140413081843264" + "140451963172416" ] }, "execution_count": 4, @@ -158,7 +158,7 @@ { "data": { "text/plain": [ - "140413081842224" + "140451963171376" ] }, "execution_count": 5, @@ -252,7 +252,7 @@ { "data": { "text/plain": [ - "140413081841824" + "140451963170976" ] }, "execution_count": 8, @@ -630,7 +630,7 @@ "execution_count": 20, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -672,7 +672,7 @@ { "data": { "text/plain": [ - "94916229764288" + "93979750270848" ] }, "execution_count": 21, @@ -696,7 +696,7 @@ { "data": { "text/plain": [ - "94916229768192" + "93979750256352" ] }, "execution_count": 22, @@ -955,7 +955,7 @@ { "data": { "text/plain": [ - "140413021591744" + "140451741882272" ] }, "execution_count": 29, @@ -972,7 +972,7 @@ "execution_count": 30, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -1721,7 +1721,7 @@ } ], "source": [ - "average_evens([40.0, 41.1, 42.2, 43.3, 44.4]) # inputs with predictable result" + "average_evens([40.0, 41.1, 42.2, 43.3, 44.4])" ] }, { @@ -1800,7 +1800,7 @@ "execution_count": 52, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -1961,7 +1961,7 @@ "execution_count": 57, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -2042,7 +2042,7 @@ "execution_count": 59, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -2343,7 +2343,7 @@ } }, "source": [ - "### Default Arguments" + "### Modularization" ] }, { @@ -2374,9 +2374,19 @@ " numbers = [round(n) for n in numbers]\n", " evens = [n for n in numbers if n % 2 == 0]\n", " average = sum(evens) / len(evens)\n", - " return average\n", - "\n", - "\n", + " return average" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "slideshow": { + "slide_type": "-" + } + }, + "outputs": [], + "source": [ "def scaled_average_evens(numbers, scalar):\n", " \"\"\" ... ... ... \"\"\"\n", " numbers = [round(n) for n in numbers]\n", @@ -2400,7 +2410,7 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 70, "metadata": { "slideshow": { "slide_type": "slide" @@ -2410,9 +2420,19 @@ "source": [ "def average_evens(numbers):\n", " \"\"\" ... ... ... \"\"\"\n", - " return scaled_average_evens(numbers, scalar=1)\n", - "\n", - "\n", + " return scaled_average_evens(numbers, scalar=1)" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "slideshow": { + "slide_type": "-" + } + }, + "outputs": [], + "source": [ "def scaled_average_evens(numbers, scalar):\n", " \"\"\" ... ... ... \"\"\"\n", " numbers = [round(n) for n in numbers]\n", @@ -2434,7 +2454,7 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 72, "metadata": { "slideshow": { "slide_type": "skip" @@ -2447,7 +2467,7 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 73, "metadata": { "slideshow": { "slide_type": "skip" @@ -2458,6 +2478,17 @@ "assert scaled_average_evens(numbers, 2) == 14.0" ] }, + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, + "source": [ + "### Default Arguments" + ] + }, { "cell_type": "markdown", "metadata": { @@ -2471,7 +2502,7 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 74, "metadata": { "slideshow": { "slide_type": "slide" @@ -2513,7 +2544,7 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 75, "metadata": { "slideshow": { "slide_type": "slide" @@ -2526,7 +2557,7 @@ "7.0" ] }, - "execution_count": 73, + "execution_count": 75, "metadata": {}, "output_type": "execute_result" } @@ -2537,10 +2568,10 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 76, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -2550,7 +2581,7 @@ "14.0" ] }, - "execution_count": 74, + "execution_count": 76, "metadata": {}, "output_type": "execute_result" } @@ -2561,10 +2592,10 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 77, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -2574,7 +2605,7 @@ "14.0" ] }, - "execution_count": 75, + "execution_count": 77, "metadata": {}, "output_type": "execute_result" } @@ -2609,7 +2640,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 78, "metadata": { "slideshow": { "slide_type": "slide" @@ -2647,7 +2678,7 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 79, "metadata": { "slideshow": { "slide_type": "slide" @@ -2660,7 +2691,7 @@ "7.0" ] }, - "execution_count": 77, + "execution_count": 79, "metadata": {}, "output_type": "execute_result" } @@ -2682,10 +2713,10 @@ }, { "cell_type": "code", - "execution_count": 78, + "execution_count": 80, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -2695,7 +2726,7 @@ "14.0" ] }, - "execution_count": 78, + "execution_count": 80, "metadata": {}, "output_type": "execute_result" } @@ -2717,7 +2748,7 @@ }, { "cell_type": "code", - "execution_count": 79, + "execution_count": 81, "metadata": { "slideshow": { "slide_type": "fragment" @@ -2731,7 +2762,7 @@ "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0maverage_evens\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnumbers\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0maverage_evens\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnumbers\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mTypeError\u001b[0m: average_evens() takes 1 positional argument but 2 were given" ] } @@ -2772,7 +2803,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 82, "metadata": { "slideshow": { "slide_type": "slide" @@ -2785,7 +2816,7 @@ "(x)>" ] }, - "execution_count": 80, + "execution_count": 82, "metadata": {}, "output_type": "execute_result" } @@ -2811,7 +2842,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 83, "metadata": { "slideshow": { "slide_type": "fragment" @@ -2835,7 +2866,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 84, "metadata": { "slideshow": { "slide_type": "fragment" @@ -2848,7 +2879,7 @@ "function" ] }, - "execution_count": 82, + "execution_count": 84, "metadata": {}, "output_type": "execute_result" } @@ -2859,10 +2890,10 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": 85, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -2872,7 +2903,7 @@ "True" ] }, - "execution_count": 83, + "execution_count": 85, "metadata": {}, "output_type": "execute_result" } @@ -2894,7 +2925,7 @@ }, { "cell_type": "code", - "execution_count": 84, + "execution_count": 86, "metadata": { "slideshow": { "slide_type": "fragment" @@ -2907,7 +2938,7 @@ "42" ] }, - "execution_count": 84, + "execution_count": 86, "metadata": {}, "output_type": "execute_result" } @@ -2929,7 +2960,7 @@ }, { "cell_type": "code", - "execution_count": 85, + "execution_count": 87, "metadata": { "slideshow": { "slide_type": "skip" @@ -2942,7 +2973,7 @@ "42" ] }, - "execution_count": 85, + "execution_count": 87, "metadata": {}, "output_type": "execute_result" } @@ -3046,7 +3077,7 @@ }, { "cell_type": "code", - "execution_count": 86, + "execution_count": 88, "metadata": { "slideshow": { "slide_type": "slide" @@ -3070,7 +3101,7 @@ }, { "cell_type": "code", - "execution_count": 87, + "execution_count": 89, "metadata": { "slideshow": { "slide_type": "fragment" @@ -3080,10 +3111,10 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 87, + "execution_count": 89, "metadata": {}, "output_type": "execute_result" } @@ -3094,7 +3125,7 @@ }, { "cell_type": "code", - "execution_count": 88, + "execution_count": 90, "metadata": { "slideshow": { "slide_type": "fragment" @@ -3104,10 +3135,10 @@ { "data": { "text/plain": [ - "140413079419024" + "140451956463472" ] }, - "execution_count": 88, + "execution_count": 90, "metadata": {}, "output_type": "execute_result" } @@ -3118,10 +3149,10 @@ }, { "cell_type": "code", - "execution_count": 89, + "execution_count": 91, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3131,7 +3162,7 @@ "module" ] }, - "execution_count": 89, + "execution_count": 91, "metadata": {}, "output_type": "execute_result" } @@ -3157,10 +3188,10 @@ }, { "cell_type": "code", - "execution_count": 90, + "execution_count": 92, "metadata": { "slideshow": { - "slide_type": "slide" + "slide_type": "skip" } }, "outputs": [ @@ -3225,7 +3256,7 @@ " 'trunc']" ] }, - "execution_count": 90, + "execution_count": 92, "metadata": {}, "output_type": "execute_result" } @@ -3247,7 +3278,7 @@ }, { "cell_type": "code", - "execution_count": 91, + "execution_count": 93, "metadata": { "slideshow": { "slide_type": "slide" @@ -3260,7 +3291,7 @@ "3.141592653589793" ] }, - "execution_count": 91, + "execution_count": 93, "metadata": {}, "output_type": "execute_result" } @@ -3271,10 +3302,10 @@ }, { "cell_type": "code", - "execution_count": 92, + "execution_count": 94, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3284,7 +3315,7 @@ "2.718281828459045" ] }, - "execution_count": 92, + "execution_count": 94, "metadata": {}, "output_type": "execute_result" } @@ -3295,7 +3326,7 @@ }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 95, "metadata": { "slideshow": { "slide_type": "slide" @@ -3308,7 +3339,7 @@ "" ] }, - "execution_count": 93, + "execution_count": 95, "metadata": {}, "output_type": "execute_result" } @@ -3319,10 +3350,10 @@ }, { "cell_type": "code", - "execution_count": 94, + "execution_count": 96, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3344,10 +3375,10 @@ }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 97, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "slide" } }, "outputs": [ @@ -3357,7 +3388,7 @@ "1.4142135623730951" ] }, - "execution_count": 95, + "execution_count": 97, "metadata": {}, "output_type": "execute_result" } @@ -3383,10 +3414,10 @@ }, { "cell_type": "code", - "execution_count": 96, + "execution_count": 98, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3396,7 +3427,7 @@ "2.0" ] }, - "execution_count": 96, + "execution_count": 98, "metadata": {}, "output_type": "execute_result" } @@ -3418,10 +3449,10 @@ }, { "cell_type": "code", - "execution_count": 97, + "execution_count": 99, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3431,7 +3462,7 @@ "10.0" ] }, - "execution_count": 97, + "execution_count": 99, "metadata": {}, "output_type": "execute_result" } @@ -3455,7 +3486,7 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": 100, "metadata": { "slideshow": { "slide_type": "skip" @@ -3468,7 +3499,7 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": 101, "metadata": { "slideshow": { "slide_type": "skip" @@ -3481,7 +3512,7 @@ "4.0" ] }, - "execution_count": 99, + "execution_count": 101, "metadata": {}, "output_type": "execute_result" } @@ -3514,7 +3545,7 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": 102, "metadata": { "slideshow": { "slide_type": "slide" @@ -3527,20 +3558,20 @@ }, { "cell_type": "code", - "execution_count": 101, + "execution_count": 103, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 101, + "execution_count": 103, "metadata": {}, "output_type": "execute_result" } @@ -3562,10 +3593,10 @@ }, { "cell_type": "code", - "execution_count": 102, + "execution_count": 104, "metadata": { "slideshow": { - "slide_type": "slide" + "slide_type": "skip" } }, "outputs": [ @@ -3636,7 +3667,7 @@ " 'weibullvariate']" ] }, - "execution_count": 102, + "execution_count": 104, "metadata": {}, "output_type": "execute_result" } @@ -3658,7 +3689,7 @@ }, { "cell_type": "code", - "execution_count": 103, + "execution_count": 105, "metadata": { "slideshow": { "slide_type": "slide" @@ -3671,7 +3702,7 @@ "" ] }, - "execution_count": 103, + "execution_count": 105, "metadata": {}, "output_type": "execute_result" } @@ -3682,10 +3713,10 @@ }, { "cell_type": "code", - "execution_count": 104, + "execution_count": 106, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3707,20 +3738,20 @@ }, { "cell_type": "code", - "execution_count": 105, + "execution_count": 107, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ { "data": { "text/plain": [ - "0.8837282454584094" + "0.09696128509713109" ] }, - "execution_count": 105, + "execution_count": 107, "metadata": {}, "output_type": "execute_result" } @@ -3742,7 +3773,7 @@ }, { "cell_type": "code", - "execution_count": 106, + "execution_count": 108, "metadata": { "slideshow": { "slide_type": "slide" @@ -3752,10 +3783,10 @@ { "data": { "text/plain": [ - ">" + ">" ] }, - "execution_count": 106, + "execution_count": 108, "metadata": {}, "output_type": "execute_result" } @@ -3766,10 +3797,10 @@ }, { "cell_type": "code", - "execution_count": 107, + "execution_count": 109, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3791,20 +3822,20 @@ }, { "cell_type": "code", - "execution_count": 108, + "execution_count": 110, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ { "data": { "text/plain": [ - "9" + "3" ] }, - "execution_count": 108, + "execution_count": 110, "metadata": {}, "output_type": "execute_result" } @@ -3828,7 +3859,7 @@ }, { "cell_type": "code", - "execution_count": 109, + "execution_count": 111, "metadata": { "slideshow": { "slide_type": "slide" @@ -3841,7 +3872,7 @@ }, { "cell_type": "code", - "execution_count": 110, + "execution_count": 112, "metadata": { "slideshow": { "slide_type": "fragment" @@ -3854,7 +3885,7 @@ "0.6394267984578837" ] }, - "execution_count": 110, + "execution_count": 112, "metadata": {}, "output_type": "execute_result" } @@ -3865,10 +3896,10 @@ }, { "cell_type": "code", - "execution_count": 111, + "execution_count": 113, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [], @@ -3878,10 +3909,10 @@ }, { "cell_type": "code", - "execution_count": 112, + "execution_count": 114, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -3891,7 +3922,7 @@ "0.6394267984578837" ] }, - "execution_count": 112, + "execution_count": 114, "metadata": {}, "output_type": "execute_result" } @@ -3956,7 +3987,7 @@ }, { "cell_type": "code", - "execution_count": 113, + "execution_count": 115, "metadata": { "slideshow": { "slide_type": "slide" @@ -3967,7 +3998,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: numpy in /home/webartifex/.pyenv/versions/anaconda3-2019.10/lib/python3.7/site-packages (1.17.2)\n" + "Requirement already satisfied: numpy in /home/webartifex/.pyenv/versions/3.7.6/envs/v-ipp/lib/python3.7/site-packages (1.18.1)\n" ] } ], @@ -3988,7 +4019,7 @@ }, { "cell_type": "code", - "execution_count": 114, + "execution_count": 116, "metadata": { "slideshow": { "slide_type": "slide" @@ -4012,7 +4043,7 @@ }, { "cell_type": "code", - "execution_count": 115, + "execution_count": 117, "metadata": { "slideshow": { "slide_type": "fragment" @@ -4022,10 +4053,10 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 115, + "execution_count": 117, "metadata": {}, "output_type": "execute_result" } @@ -4047,7 +4078,7 @@ }, { "cell_type": "code", - "execution_count": 116, + "execution_count": 118, "metadata": { "slideshow": { "slide_type": "slide" @@ -4060,7 +4091,7 @@ }, { "cell_type": "code", - "execution_count": 117, + "execution_count": 119, "metadata": { "slideshow": { "slide_type": "fragment" @@ -4073,7 +4104,7 @@ "array([ 7, 11, 8, 5, 3, 12, 2, 6, 9, 10, 1, 4])" ] }, - "execution_count": 117, + "execution_count": 119, "metadata": {}, "output_type": "execute_result" } @@ -4084,10 +4115,10 @@ }, { "cell_type": "code", - "execution_count": 118, + "execution_count": 120, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -4097,7 +4128,7 @@ "numpy.ndarray" ] }, - "execution_count": 118, + "execution_count": 120, "metadata": {}, "output_type": "execute_result" } @@ -4121,7 +4152,7 @@ }, { "cell_type": "code", - "execution_count": 119, + "execution_count": 121, "metadata": { "slideshow": { "slide_type": "slide" @@ -4134,7 +4165,7 @@ "array([14, 22, 16, 10, 6, 24, 4, 12, 18, 20, 2, 8])" ] }, - "execution_count": 119, + "execution_count": 121, "metadata": {}, "output_type": "execute_result" } @@ -4156,7 +4187,7 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": 122, "metadata": { "slideshow": { "slide_type": "fragment" @@ -4169,7 +4200,7 @@ "[7, 11, 8, 5, 3, 12, 2, 6, 9, 10, 1, 4, 7, 11, 8, 5, 3, 12, 2, 6, 9, 10, 1, 4]" ] }, - "execution_count": 120, + "execution_count": 122, "metadata": {}, "output_type": "execute_result" } @@ -4191,7 +4222,7 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 123, "metadata": { "slideshow": { "slide_type": "fragment" @@ -4204,7 +4235,7 @@ "78" ] }, - "execution_count": 121, + "execution_count": 123, "metadata": {}, "output_type": "execute_result" } @@ -4215,10 +4246,10 @@ }, { "cell_type": "code", - "execution_count": 122, + "execution_count": 124, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -4228,7 +4259,7 @@ "7" ] }, - "execution_count": 122, + "execution_count": 124, "metadata": {}, "output_type": "execute_result" } @@ -4267,7 +4298,7 @@ }, { "cell_type": "code", - "execution_count": 123, + "execution_count": 125, "metadata": { "slideshow": { "slide_type": "slide" @@ -4280,7 +4311,7 @@ }, { "cell_type": "code", - "execution_count": 124, + "execution_count": 126, "metadata": { "slideshow": { "slide_type": "fragment" @@ -4293,7 +4324,7 @@ "" ] }, - "execution_count": 124, + "execution_count": 126, "metadata": {}, "output_type": "execute_result" } @@ -4319,10 +4350,10 @@ }, { "cell_type": "code", - "execution_count": 125, + "execution_count": 127, "metadata": { "slideshow": { - "slide_type": "fragment" + "slide_type": "skip" } }, "outputs": [ @@ -4344,7 +4375,7 @@ " 'average_odds']" ] }, - "execution_count": 125, + "execution_count": 127, "metadata": {}, "output_type": "execute_result" } @@ -4366,12 +4397,36 @@ }, { "cell_type": "code", - "execution_count": 126, + "execution_count": 128, "metadata": { "slideshow": { "slide_type": "slide" } }, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 128, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mod.average_evens" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": { + "slideshow": { + "slide_type": "fragment" + } + }, "outputs": [ { "name": "stdout", @@ -4399,7 +4454,7 @@ }, { "cell_type": "code", - "execution_count": 127, + "execution_count": 130, "metadata": { "slideshow": { "slide_type": "slide" @@ -4412,7 +4467,7 @@ "7.0" ] }, - "execution_count": 127, + "execution_count": 130, "metadata": {}, "output_type": "execute_result" } @@ -4423,10 +4478,10 @@ }, { "cell_type": "code", - "execution_count": 128, + "execution_count": 131, "metadata": { "slideshow": { - "slide_type": "-" + "slide_type": "fragment" } }, "outputs": [ @@ -4436,7 +4491,7 @@ "14.0" ] }, - "execution_count": 128, + "execution_count": 131, "metadata": {}, "output_type": "execute_result" } @@ -4501,7 +4556,6 @@ } ], "metadata": { - "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python 3", "language": "python", @@ -4517,7 +4571,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.6" }, "livereveal": { "auto_select": "code", diff --git a/02_functions_01_review.ipynb b/02_functions_01_review.ipynb index f081ec6..3b58b22 100644 --- a/02_functions_01_review.ipynb +++ b/02_functions_01_review.ipynb @@ -220,7 +220,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.6" }, "toc": { "base_numbering": 1, diff --git a/02_functions_02_exercises.ipynb b/02_functions_02_exercises.ipynb index 00cd198..cc0accd 100644 --- a/02_functions_02_exercises.ipynb +++ b/02_functions_02_exercises.ipynb @@ -18,7 +18,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Read [Chapter 2](https://nbviewer.jupyter.org/github/webartifex/intro-to-python/blob/master/02_functions_00_lecture.ipynb) of the book. Then, work through the exercises below." + "Read [Chapter 2](https://nbviewer.jupyter.org/github/webartifex/intro-to-python/blob/master/02_functions_00_lecture.ipynb) of the book. Then, work through the exercises below. The `...` indicate where you need to fill in your answers. You should not need to create any additional code cells." ] }, { @@ -213,7 +213,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.4" + "version": "3.7.6" }, "toc": { "base_numbering": 1,