Answers for "clamp number in python"

1

clamp number in python

def clamp(num, min, max):
    if num > max:
        return max
    elif num < min:
        return min
    else:
        return num
Posted by: Guest on August-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language