"""simple docstring"""






from collections.abc import Callable

import numpy as np



def   a_						(					lowerCamelCase					,			lowerCamelCase					,			lowerCamelCase					,			lowerCamelCase					,			lowerCamelCase       ):
				UpperCAmelCase__             =							int(np.ceil((x_end - xa) / step_size       )       )
				UpperCAmelCase__             =							np.zeros((n + 1,)       )
				UpperCAmelCase__             =							ya
				UpperCAmelCase__             =							xa

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

				return y


if __name__ == "__main__":
						import doctest

						doctest.testmod()




"""simple docstring"""






import math



def   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(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   a_						(					lowerCamelCase					,			lowerCamelCase       ):
				if (
				    not isinstance(lowerCamelCase					,			(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()



