Problem 155806 · easy · Phase 01 Prerequisites & Setup

Coldest Reading

lists · min-by-hand · loops

A sensor logs temperature readings through the night. Write coldest(readings) that returns the lowest reading without using the built-in min function. Return None if there are no readings.

Examples

Input:  readings = [3.5, -2.0, 7.1]
Output: -2.0

Input:  readings = []
Output: None

Constraints

  • 0 <= len(readings) <= 5000

Goals

  • Find the smallest value with your own loop
  • Return None when there is no data
Starting Python…