Clamp a number to a range, then round to the nearest ten with halves away from zero.
Constraints
Example
>>> clamp_round_to_ten(13, 0, 100) 10 >>> clamp_round_to_ten(27, 10, 20) 20 >>> clamp_round_to_ten(-8, -30, -5) -10 >>> clamp_round_to_ten(5, 10, 20) 10 >>> clamp_round_to_ten(18, 12, 15) 20
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints