




import numpy as np




def        _SCREAMING_SNAKE_CASE      (		snake_case			,     snake_case			,     snake_case			,     snake_case			,     snake_case       )						->				int:
      _UpperCAmelCase      =			int(np.ceil((x_end - xa) / h       )       )
      _UpperCAmelCase      =			np.zeros((n + 1,)       )
      _UpperCAmelCase      =			ya
      _UpperCAmelCase      =			xa

      for k in range(snake_case       ):
            _UpperCAmelCase      =			f(snake_case			,     y[k]       )
            _UpperCAmelCase      =			f(x + 0.5 * h			,     y[k] + 0.5 * h * ka       )
            _UpperCAmelCase      =			f(x + 0.5 * h			,     y[k] + 0.5 * h * ka       )
            _UpperCAmelCase      =			f(x + h			,     y[k] + h * ka       )
            _UpperCAmelCase      =			y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
            x += h

      return y


if __name__ == "__main__":
    import doctest

    doctest.testmod()





import math




def        _SCREAMING_SNAKE_CASE      (		snake_case			,     snake_case       )						->				float:
						if (
						    not isinstance(snake_case			,     (int, float)       )
						    or power_factor < -1
						    or power_factor > 1
						):
												raise ValueError("""power_factor must be a valid float value between -1 and 1."""       )
						return apparent_power * power_factor




def        _SCREAMING_SNAKE_CASE      (		snake_case			,     snake_case       )						->				float:
						if (
						    not isinstance(snake_case			,     (int, float)       )
						    or power_factor < -1
						    or power_factor > 1
						):
												raise ValueError("""power_factor must be a valid float value between -1 and 1."""       )
						return apparent_power * math.sqrt(1 - power_factor**2       )


if __name__ == "__main__":
				import doctest

				doctest.testmod()