



from collections.abc import Callable

import numpy as np


def      UpperCamelCase(    __UpperCamelCase				:						Callable	,__UpperCamelCase				:						float	,__UpperCamelCase				:						float	,__UpperCamelCase				:						float	,__UpperCamelCase				:						float					):
		lowerCAmelCase_     :	int							   =					int(np.ceil((x_end - xa) / step_size					)					)
		lowerCAmelCase_     :	Optional[int]							   =					np.zeros((n + 1,)					)
		lowerCAmelCase_     :	Optional[int]							   =					ya
		lowerCAmelCase_     :	Any							   =					xa

		for k in range(UpperCamelCase__					):
				lowerCAmelCase_     :	Any							   =					y[k] + step_size * ode_func(UpperCamelCase__	,y[k]					)
				x += step_size

		return y


if __name__ == "__main__":
						import doctest

						doctest.testmod()






'''simple docstring'''


import math





def    lowerCAmelCase       (		UpperCamelCase__					: float     ,       UpperCamelCase__					: float							):


	"""simple docstring"""
	if (
	    not isinstance(UpperCamelCase__     ,       (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    lowerCAmelCase       (		UpperCamelCase__					: float     ,       UpperCamelCase__					: float							):


	"""simple docstring"""
	if (
	    not isinstance(UpperCamelCase__     ,       (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()
