Problem 123423 · easy · Phase 01 Prerequisites & Setup

Body Temperature Check

conditionals · comparison

Write temperature_status(temp_c) that reads a body temperature in degrees Celsius and returns:

  • "hypothermia" below 35.0
  • "normal" from 35.0 up to and including 37.5
  • "fever" above 37.5 up to and including 39.0
  • "high fever" above 39.0

Examples

Input:  temp_c = 36.6
Output: "normal"

Input:  temp_c = 38.2
Output: "fever"

Input:  temp_c = 40.1
Output: "high fever"

Constraints

  • 20.0 <= temp_c <= 45.0

Goals

  • Classify a float into labelled ranges
  • Get the boundaries exactly right
Starting Python…