Description
Our reactor will Meltdown!
The intervals:
green -> 80-100% efficiency
orange -> 60-79% efficiency
red -> 30-59% efficiency
black -> <30% efficient
are not properly closed. In which interval does the 79.5% fall? And 59.73%?
The exemplar solution does suggest that voltage
, current
and theoretical_max_power
being integers (but why?);
this fact however does not make the percentage_range
automatically integer as well.
I see two options:
-
Casting the
percentage_range
to integer (but why?), and staying in the integer scope with the existing intervals.
The integer percentage should then also be mentioned in the instructions. -
Keep floating
percentage_range
and include/exclude left and right interval limits with a proper use of<
and<=
.
Personally, I would go with the second suggestion, it's much more realistic and let the students also think about the limits.
In both cases, instructions should be updated.
The border cases should also be verified in the tests!
A proposal for rephrasing the intervals:
green -> efficiency of 80% or more,
orange -> efficiency of less than 80% but at least 60%,
red -> efficiency below 60%, but still 30% or more,
black -> less than 30% efficient.
I'm happy to do a PR after reaching the agreement between options 1 and 2.