Thermometer
ABC 397Problem 19 of 50
EasyWhat to do
Classify a body temperature: return 1 if temperature >= 38.0 (high fever), 2 if >= 37.5 but < 38.0 (fever), or 3 if < 37.5 (normal).
Key Concepts
if-statements
comparison operators
input and output
basic math
Examples
Input:
temperature = 40.0
Output:
1
Input:
temperature = 37.7
Output:
2
Tips for Beginners
- Focus on understanding the logic, not memorizing syntax
- Use print statements to debug your code
- Don't worry about input parsing - the function handles that for you
- If stuck, try writing out your solution on paper first
Python Editor
Loading Python...