A reactor is said to be critical if it satisfies the following conditions:
The temperature is less than 800 K.
The number of neutrons emitted per second is greater than 500.
The product of temperature and neutrons emitted per second is less than 500000.
Implement the function is_criticality_balanced() that takes temperature measured in kelvin and neutrons_emitted as parameters, and returns True if the criticality conditions are met, False if not.
code:
if temperature <= 800 and neutrons_emitted > 500 and temperature * neutrons_emitted <= 500000:
return True
else:
return False
Why do all the test cases fail?