Outline for October 8, 2020

Reading: §2.10, 4.4, 6.11
Due: Homework 1, due October 15, 2020


  1. Review of input()

  2. Output [printing.py]
    1. Printing without format
    2. Printing with format using %
    3. Printing with format using format method

  3. import statement
    1. import math [hypot.py]
    2. Need the “math.” before “sqrt”
    3. from math import sqrt [hypot1.py]
    4. Do not need the “math.” before “sqrt”
    5. Now add in exception handling [hypotex.py]

  4. Simultaneous assignment [swap.py]
    1. Simple assignment: variable = expression
    2. Simultaneous assignment: variableA, variableB = expressionA, expressionB

  5. Decision structures [if0.py]
    1. If statement
    2. Executes once, based on condition
    3. Syntax


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 October 6, 2020 at 11:04PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh