


'''simple docstring'''





from __future__ import annotations


def 					a__    (				UpperCamelCase_	:			list[int | float],      UpperCamelCase_	:			int,      UpperCamelCase_	:			int	):
   if len(UpperCamelCase_	) == 0:
      raise ValueError('''find_min() arg is an empty sequence'''	)
   if (
       left >= len(UpperCamelCase_	)
       or left < -len(UpperCamelCase_	)
       or right >= len(UpperCamelCase_	)
       or right < -len(UpperCamelCase_	)
   ):
      raise IndexError('''list index out of range'''	)
   if left == right:
      return nums[left]
   UpperCAmelCase__  :Any            =			(left + right) >> 1  # the middle
   UpperCAmelCase__  :Optional[Any]            =			find_min(UpperCamelCase_,      UpperCamelCase_,      UpperCamelCase_	)  # find min in range[left, mid]
   UpperCAmelCase__  :Tuple            =			find_min(UpperCamelCase_,      mid + 1,      UpperCamelCase_	)  # find min in range[mid + 1, right]

   return left_min if left_min <= right_min else right_min


if __name__ == "__main__":
    import doctest

    doctest.testmod(verbose=True)







'''simple docstring'''





from scipy.constants import g


def 					a__    (				UpperCamelCase_	:			float,      UpperCamelCase_	:			float	):
   if mass < 0:
      # handling of negative values of mass
      raise ValueError('''The mass of a body cannot be negative'''	)
   if height < 0:
      # handling of negative values of height
      raise ValueError('''The height above the ground cannot be negative'''	)
   return mass * g * height


if __name__ == "__main__":
    from doctest import testmod

    testmod(name='''potential_energy''')



