from collections.abc import Callable

import numpy as np







def 						A__  (					__A   , __A   , __A   , __A   , __A	):







    '''simple docstring'''
    _lowerCamelCase     :		Union[str, Any] 						=						int(np.ceil((x_end - xa) / step_size	)	)
    _lowerCamelCase     :		int 						=						np.zeros((n + 1,)	)
    _lowerCamelCase     :		Dict 						=						ya
    _lowerCamelCase     :		Tuple 						=						xa

    for k in range(__A	):
        _lowerCamelCase     :		int 						=						y[k] + step_size * ode_func(__A   , y[k]	)
        _lowerCamelCase     :		Optional[Any] 						=						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()





import math







def 						A__  (					__A	):







    '''simple docstring'''
    assert isinstance(__A   , __A	) and (
        number >= 0
    ), "'number' must been an int and positive"

    if 1 < number < 4:
        # 2 and 3 are primes
        return True
    elif number < 2 or not number % 2:
        # Negatives, 0, 1 and all even numbers are not primes
        return False

    _lowerCamelCase     :		List[Any] 						=						range(3   , int(math.sqrt(__A	) + 1	)   , 2	)
    return not any(not number % i for i in odd_numbers	)







def 						A__  (					__A   , __A=1   , **__A	):







    '''simple docstring'''
    _lowerCamelCase     :		Dict 						=						factor * value
    _lowerCamelCase     :		str 						=						value

    while not is_prime(__A	):
        value += 1 if not ("desc" in kwargs and kwargs["desc"] is True) else -1

    if value == first_value_val:
        return next_prime(value + 1   , **__A	)
    return value




