Exercise Meltdown Mitigation

Guys, I’m on the topic 3. Fail Safe Mechanism of the Meltdown Mitigation.
And I have no Idea how much is plus or minus 10% :expressionless:. Can someone explain to me how that supose to work, please?

1 Like

If temperature * neutrons_produced_per_second < 90% of threshold, output a status code of ‘LOW’ indicating that control rods must be removed to produce power.

Translating English to Python,

if temperature * neutrons_produced_per_second < 0.90 * threshold:
    result = "LOW"

Does that help?

1 Like

Actually no, the problem I’m having is with the ‘NORMAL’ code.

  • If temperature * neutrons_produced_per_second are within plus or minus 10% of the threshold the reactor is in criticality and the status code of ‘NORMAL’ should be output, indicating that the reactor is in optimum condition and control rods are in an ideal position.

That’s the same as the prior one except rather than checking 90% you need to check it is between 90% and 110%.

if 0.90 * threshold <= temperature * neutrons_produced_per_second <= 1.10 * threshold:
    result = "NORMAL"
1 Like

I can’t believe it :sweat:
Probably I missunderstood the english but the text sound to me something like “around 10%”.
Well, anyway…
Thank you very much for your help.
:grinning:

Agree the task description is very confusing.
Probably should be adjusted :sweat_smile:

I’ve opened a PR: [meltdown-mitigation] Be super explicit by iHiD · Pull Request #3501 · exercism/python · GitHub

I don’t fully understand where the confusion lies (I’m reading it for the first time and it feels clear to me), so if you could explain specifically where it’s unclear to you, we can amend it accordingly :slight_smile:

Approved and merged!

2 Likes

When I read ± 10% in my mind I see a range around a fixed number.
For example: 90 ±10 would be 80 - 100.
First, I thought that the number should be threshold - 10% and threshold + 10%.
I hope you get the idea.

1 Like

The new description is more clear now. Thank you for your work :blush:

1 Like