A thermal monitoring program processes sensor data to classify the safety status of a chemical reactor core.
The program must continually prompt the user to input a temperature (an integer in degrees Celsius) and output the corresponding classification until the user inputs 999 to stop the program.
The lines of code required for this program are currently mixed up and have had their indentation removed.
| Input temperature (°C) | Output |
|---|---|
999 | Exits program |
1 to 150 | "Safe" |
151 to 300 | "Elevated" |
301 or more | "Hazardous" |
temp = int(input("Enter temperature: "))print("Elevated")else:while temp != 999:print("Hazardous")if temp <= 150:temp = int(input("Enter temperature: "))print("Safe")elif temp <= 300:Rearrange these exact lines of code and apply correct indentation, white space, and logical order so that the program runs correctly and produces the required outputs.
Do not change the text or commands inside the provided lines of code. Do not add any additional statements.