{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Functions\n", "\n", "- defining a function\n", " - `def`\n", " - `return`\n", " - default values\n", " - keyword vs. positional arguments\n", "- executing a function\n", " - parameters\n", " - separate namespace" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Vocab\n", "\n", "- **Define/create/make** a function: To set up and write the instructions for a function.\n", "- **Execute/call/use** a function: To actually use the pre-defined function.\n", "\n", "- **Input/parameter/argument**: A variable defined by the user that is put/passed in between the parantheses `()` that comes after the function name. \n", "- **Output**: The variable that is `return`ed to the user after the function is executed." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Functions\n", "\n", "