Given the variable temperature, write an if/elif/else chain: print "Hot" if temperature is 30 or abo
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Given the variable temperature, write an if/elif/else chain: print "Hot" if temperature is 30 or above, "Warm" if 20 or above, otherwise "Cold".
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.