Week 5: September 26 - 30

Floating-Point Numbers

Although mathematics deals with real numbers of infinite precision, these numbers must be represented in a computer using a finite number of digits. We examine ways in which this can be done effectively, and some of the problems and issues that arise in doing so.

Floating-Point Arithmetic - Hazards and Fixes

Our exploration of floating-point arithmetic continues with an examination of common problems that can arise, and the ways in which these problems can be avoided.

Python

  • Error handling with try/except

NumPy

  • Indexing using boolean arrays
  • Indexing using integer arrays
  • where

Matplotlib

  • legend

Quiz 4: Lists

  • Creating lists
  • append
  • List indexing and slicing
  • List concatenation
  • List comprehensions
  • len

Sample Quiz 4