ChEn263 — Lecture 4
Lecture 4 - Functions
- This lectures discusses the concept of functions as a mapping between an input and an output. I discuss examples of functions as formulas and procedures and talk about their use as abstractions, as reusable code, and as organization tools. I give some ideas about how functions are implemented in the spreadsheet tool MS Excel and the programming language Python.
Examples
- This video gives examples showing the use of functions (i.e. formulas) in Excel.
-
This video gives examples of functions in Python. It includes the use of modules (i.e. math, numpy), how to call a function and how to define a function.