You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Task 2 of the Meltdown exercise should be rephrased. #2565
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.
@kbuc - excellent catch! Thank you for logging this!
I am inclined at first glance to go with option 2. BUT. 😄 So if we are going to do option 2, I would want the instructions to be really clear with students, so we don't get solutions that use round or floor or some other funky mechanic. There are always more decimal places, so a limit needs to be a limit of precision as well.
I'd also suggest that the revised intervals be written as floats (with the expected precision), or otherwise nudge students toward the option that they will want to use => and > appropriately, to account for the infinite amount of numbers between the intervals. And yes, test cases need to be done. 😄
And I would be happy if you want to take this on! In fact, there is also contention around some of the other tasks in the exercise (see #2535 and #2566 ), which could use some fresh eyes - if you wouldn't mind giving it a full once-over?
Since the focus of the exercise is on conditionals, I would not complicate with floating point peculiarities. As long as the student uses proper math (normal division, comparison with bounds included or not), the tests should pass.
I have rewritten the tests to verify more points, especially around the border cases. For this, I discontinued the practice of making a separate test for each combination of input parameters (because that leads to too many overhead and is also slower), but only made 3 tests (one for each function) and looping through the several testing points in each test.
Activity
BethanyG commentedon Sep 8, 2021
@kbuc - excellent catch! Thank you for logging this!
I am inclined at first glance to go with
option 2. BUT. 😄 So if we are going to dooption 2, I would want the instructions to be really clear with students, so we don't get solutions that use round or floor or some other funky mechanic. There are always more decimal places, so a limit needs to be a limit of precision as well.I'd also suggest that the revised intervals be written as floats (with the expected precision), or otherwise nudge students toward the option that they will want to use
=>and>appropriately, to account for the infinite amount of numbers between the intervals. And yes, test cases need to be done. 😄And I would be happy if you want to take this on! In fact, there is also contention around some of the other tasks in the exercise (see #2535 and #2566 ), which could use some fresh eyes - if you wouldn't mind giving it a full once-over?
kbuc commentedon Sep 10, 2021
Since the focus of the exercise is on conditionals, I would not complicate with floating point peculiarities. As long as the student uses proper math (normal division, comparison with bounds included or not), the tests should pass.
I have rewritten the tests to verify more points, especially around the border cases. For this, I discontinued the practice of making a separate test for each combination of input parameters (because that leads to too many overhead and is also slower), but only made 3 tests (one for each function) and looping through the several testing points in each test.
Meltdown exercise change according to issue exercism#2565
Meltdown exercise change according to issue #2565
BethanyG commentedon Sep 22, 2021
Closing this as PR2568 has been merged and closed.