def minimax(val, default, low, high):
 val = try_int(val, default)
 if (val < low):
  return low
 if (val > high):
  return high
 return val

def minimax ( val , default , low , high ) : val = try_int ( val , default ) if ( val < low ) : return low if ( val > high ) : return high return val
return value forced within range .