1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Julia

Connected

Exercise

Conditioning on body temperature

Let's say you were tasked with programming a diagnostic tool that assesses a patient's body temperature. You want to print warnings if the temperature is too high or too low and a reassuring message if it is just right. In this exercise, you'll write a conditional expression to aid the diagnosis.

The float body_temp, which is the body temperature in degrees Celsius, is available in your environment.

Instructions

100 XP
  • Print the message "Seems a little cold" if body_temp is less than 35.9.
  • Print the message "Might be a fever" if body_temp is more than 37.6.
  • Print the message "The patient's temperature seems normal" otherwise.