Outline for November 3, 2020

Reading: §8
Due: Homework 3, due November 13, 2020

  1. Searching a list
    1. Example use: linear search [linsearch.py]

  2. Lists as parameters: can change list elements in function and they are changed in caller [args2.py]

  3. More on parameters: named arguments and variable number of arguments [args3.py]

  4. Tuples
    1. Used to group data
    2. Like lists, but immutable

  5. isinstance(obj,type) function
    1. type is bool, float, int, list, str, tuple

  6. Refactoring code
    1. Compute the perimeter of a triangle [peri0.py]

UC Davis sigil
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.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh