Outline for November 3, 2020
Reading
: §8
Due
: Homework 3, due November 13, 2020
Searching a list
Example use: linear search [
linsearch.py
]
Lists as parameters: can change list elements in function and they are changed in caller [
args2.py
]
More on parameters: named arguments and variable number of arguments [
args3.py
]
Tuples
Used to group data
Like lists, but immutable
isinstance(obj,type)
function
type
is
bool
,
float
,
int
,
list
,
str
,
tuple
Refactoring code
Compute the perimeter of a triangle [
peri0.py
]
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email:
mabishop@ucdavis.edu
MHI 289I, Programming for Health Informatics
Version of November 4, 2020 at 3:58PM
You can also obtain a PDF version of this.