

_SCREAMING_SNAKE_CASE  :						Union[str, Any]         =    9.8_0_6_6_5
def        UpperCAmelCase_     (		_A   ,	_A   ,	_A = g       ):





     '''simple docstring'''




     if fluid_density <= 0:
          raise ValueError('''Impossible fluid density'''       )
     if volume < 0:
          raise ValueError('''Impossible Object volume'''       )
     if gravity <= 0:
          raise ValueError('''Impossible Gravity'''       )

     return fluid_density * gravity * volume


if __name__ == "__main__":
       import doctest

       # run doctest
       doctest.testmod()





from collections.abc import Callable

import numpy as np
def        UpperCAmelCase_     (		_A   ,	_A   ,	_A   ,	_A   ,	_A       ):





     '''simple docstring'''




     SCREAMING_SNAKE_CASE__					=					int(np.ceil((x_end - xa) / step_size       )       )
     SCREAMING_SNAKE_CASE__					=					np.zeros((n + 1,)       )
     SCREAMING_SNAKE_CASE__					=					ya
     SCREAMING_SNAKE_CASE__					=					xa

     for k in range(_A       ):
          SCREAMING_SNAKE_CASE__					=					y[k] + step_size * ode_func(_A   ,	y[k]       )
          SCREAMING_SNAKE_CASE__					=					y[k] + (
              (step_size / 2) * (ode_func(_A   ,	y[k]       ) + ode_func(x + step_size   ,	_A       ))
          )
          x += step_size

     return y


if __name__ == "__main__":
       import doctest

       doctest.testmod()


