
Between 1985 and 1987 the Therac-25 radiotherapy machine gave at least six patients massive radiation overdoses, and several died. A quick operator could set up an X-ray shot, then switch to electron mode within a few seconds, faster than the software expected. A race left the machine in high power with the metal beam spreader retracted, firing about a hundred times the intended dose straight at a bare patient. The interlock that should have caught it never fired. Make it fire.
Repair this code
Repair the interlock so a high power beam with no spreader deployed delivers nothing instead of an overdose.
Steps
$ beam_dose(0, 0)
200
$ beam_dose(1, 1)
200
$ beam_dose(1, 0)
0
Expected files
Allowed functions
None. Write every helper yourself.
Loading solutions...