Outline for October 20, 2020
Reading
: §4
Due
: Homework 2, due October 29, 2020
Functions [
hello.py
]
What functions are
Defining them
Using them
Quick look at using them [
quad.py
]
Passing values to functions
Returning values from functions
In more detail: passing values to functions [
args.py
]
Formal parameters in subject definition
Actual parameters (arguments)
Matching arguments to formal parameters
Local variables
In more detail: how Python does function calls [
quad.py
]
Caller suspends execution at point of call, remembers where it left off
Formal parameters assigned values from actual parameters
Execute function body
Return control to where caller left off
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email:
mabishop@ucdavis.edu
MHI 289I, Programming for Health Informatics
Version of October 20, 2020 at 4:19PM
You can also obtain a PDF version of this.