Problem 166465 · easy · Phase 01 Prerequisites & Setup

Egg Timer

conditionals · comparison

Write egg_doneness(minutes) that describes a boiled egg from how long it was cooked:

  • 0 minutes or less: "raw"
  • less than 4 minutes: "soft"
  • 4 up to (but not including) 7 minutes: "medium"
  • 7 up to and including 12 minutes: "hard"
  • more than 12 minutes: "overcooked"

Examples

Input:  minutes = 5
Output: "medium"

Input:  minutes = 3
Output: "soft"

Input:  minutes = 15
Output: "overcooked"

Constraints

  • -10 <= minutes <= 100 (may be a float)

Goals

  • Turn a cooking time into a label
  • Handle the zero-or-less case separately
Starting Python…