

from __future__ import annotations

from math import pow, sqrt





def 	__a     (      A__			:  float			,  A__			:  float			,  A__			:  float       ):
    if (resistance, reactance, impedance).count(0       ) != 1:
        raise ValueError("One and only one argument must be 0"       )
    if resistance == 0:
        return {"resistance": sqrt(pow(A__			,  2       ) - pow(A__			,  2       )       )}
    elif reactance == 0:
        return {"reactance": sqrt(pow(A__			,  2       ) - pow(A__			,  2       )       )}
    elif impedance == 0:
        return {"impedance": sqrt(pow(A__			,  2       ) + pow(A__			,  2       )       )}
    else:
        raise ValueError("Exactly one argument must be 0"       )


if __name__ == "__main__":
    import doctest

    doctest.testmod()


from collections.abc import Callable

import numpy as np





def 	__a     (      A__			:  Callable			,  A__			:  float			,  A__			:  float			,  A__			:  float			,  A__			:  float       ):
    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()