diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2025-05-08 17:59:59 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2025-05-08 17:59:59 -0600 |
| commit | 3eb4be2a880eed828c983c8a30d73faa8e6f4746 (patch) | |
| tree | 319368d9135adfe8a9133d0f6046177a13acc54a /tutorials/module_1/notebook_1/functions.ipynb | |
| parent | e22e15fd8d9d0511a7cfa8fdb0e75509aeba6a15 (diff) | |
Worked on module_3 notebooks
Diffstat (limited to 'tutorials/module_1/notebook_1/functions.ipynb')
| -rw-r--r-- | tutorials/module_1/notebook_1/functions.ipynb | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tutorials/module_1/notebook_1/functions.ipynb b/tutorials/module_1/notebook_1/functions.ipynb index b3a56af..fe3317d 100644 --- a/tutorials/module_1/notebook_1/functions.ipynb +++ b/tutorials/module_1/notebook_1/functions.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "c549f9ae-7280-471e-a7e3-92d3340b7514", + "id": "cb3c1386-3242-4781-8e63-bc304b7337d7", "metadata": {}, "source": [ "# Functions\n", @@ -39,11 +39,14 @@ "```\n", "\n", "Note input variables can be of any data type (integer, float, string,\n", - "etc.). \\### Returning values from a function If we want to calculate a\n", - "value and pass it back to the script for further use, we can use the\n", - "`return` keyword. Let’s define a linear function that takes two inputs,\n", - "`x` and `b`, computes the corresponding `y` value, and returns it so it\n", - "can be used elsewhere in the code.\n", + "etc.).\n", + "\n", + "### Returning values from a function\n", + "\n", + "If we want to calculate a value and pass it back to the script for\n", + "further use, we can use the `return` keyword. Let’s define a linear\n", + "function that takes two inputs, `x` and `b`, computes the corresponding\n", + "`y` value, and returns it so it can be used elsewhere in the code.\n", "\n", "``` python\n", " def function(x, b):\n", @@ -51,10 +54,13 @@ " return y\n", "```\n", "\n", - "For multiple output variables we can add \\## Calling functions Now that\n", - "we’ve covered defining functions we want to call the function in order\n", - "to execute the block inside the function. To do this, we simply re-call\n", - "the function name as follows.\n", + "For multiple output variables we can add\n", + "\n", + "## Calling functions\n", + "\n", + "Now that we’ve covered defining functions we want to call the function\n", + "in order to execute the block inside the function. To do this, we simply\n", + "re-call the function name as follows.\n", "\n", "``` python\n", "function(2,-1)\n", |
