conditionals — where ai silently bugs8 / 9
elif chains and the match statement cursor reaches for
Write an if/elif/else chain that takes the variable temp = 72 and
prints exactly one of these labels:
"hot"iftemp >= 85"warm"iftemp >= 70"cool"iftemp >= 55"cold"otherwise
For temp = 72, the expected output is:
warm
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _