Goldilocks' thermostat challenge

Report a typo

Can you fill the blanks in the code to check if the current temperature is within a safe range? The program should print "Safe" if the temperature is between the minimum and maximum values, and "Alert!" otherwise.

Fill in the gaps with the relevant elements
current_temp = 22
safe_min = 18
safe_max = 24
 current_temp >= safe_min  current_temp <= safe_max:
    ("Safe\n")
else:
    print("Alert!\n")

Create a free account to access the full topic