'''simple docstring'''




import numpy as np






def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							)      ->       str:
    __lowerCamelCase            =    int(np.ceil((x_end - xa) / h							)							)
    __lowerCamelCase            =    np.zeros((n + 1,)							)
    __lowerCamelCase            =    ya
    __lowerCamelCase            =    xa

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

    return y


if __name__ == "__main__":
  import doctest

  doctest.testmod()

'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							)      ->       float:
    return base * power(UpperCamelCase__							,    (exponent - 1)							) if exponent else 1


if __name__ == "__main__":
  print("Raise base to the power of exponent using recursion...")
  __UpperCAmelCase					=int(input("Enter the base: ").strip())
  __UpperCAmelCase					=int(input("Enter the exponent: ").strip())
  __UpperCAmelCase					=power(base, abs(exponent))
  if exponent < 0:  # power() does not properly deal w/ negative exponents
    __UpperCAmelCase					=1 / result
  print(f'{base} to the power of {exponent} is {result}')
