week2/l4problem5.py
def clip(lo, x, hi):
    '''
    Takes in three numbers and returns a value based on the value of x.
    Returns:
     - lo, when x < lo
     - hi, when x > hi
     - x, otherwise
    '''

    return max(lo, min(hi, x))

    Takes in three numbers and returns a value based on the value of x.
    Returns:
     - lo, when x < lo
     - hi, when x > hi
     - x, otherwise
    
Takes in three numbers and returns a value based on the value of x.
Takes in three numbers and returns a value based on the value of x .
def clip(lo, x, hi):
    return max(lo, min(hi, x))
def clip ( lo , x , hi ) : return max ( lo , min ( hi , x ) )
Takes in three numbers and returns a value based on the value of x.
Takes in three numbers and returns a value based on the value of x .
'''
    Takes in three numbers and returns a value based on the value of x.
    Returns:
     - lo, when x < lo
     - hi, when x > hi
     - x, otherwise
    '''
lo, when x < lo
hi, when x > hi
x, otherwise
lo when x < lo hi when x > hi x otherwise
lo
x
hi