Write a function that restricts a number to a given inclusive interval.
Constraints
Example
>>> clamp(5, 1, 10) 5 >>> clamp(-5, 1, 10) 1 >>> clamp(15, 1, 10) 10 >>> clamp(2.5, 0.0, 1.5) 1.5
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints