


"""simple docstring"""






from collections.abc import Callable

import numpy as np


def __lowercase     (      lowerCamelCase_  :      Callable						,					lowerCamelCase_  :      float						,					lowerCamelCase_  :      float						,					lowerCamelCase_  :      float						,					lowerCamelCase_  :      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(SCREAMING_SNAKE_CASE_  ):
        SCREAMING_SNAKE_CASE__     							=				y[k] + step_size * ode_func(SCREAMING_SNAKE_CASE_						,					y[k]  )
        SCREAMING_SNAKE_CASE__     							=				y[k] + (
            (step_size / 2) * (ode_func(SCREAMING_SNAKE_CASE_						,					y[k]  ) + ode_func(x + step_size						,					SCREAMING_SNAKE_CASE_  ))
        )
        x += step_size

    return y


if __name__ == "__main__":
 import doctest

 doctest.testmod()




"""simple docstring"""






def __lowercase     (      lowerCamelCase_  :      List[Any]  ):
				SCREAMING_SNAKE_CASE__     							=				[]
				SCREAMING_SNAKE_CASE__     							=				set({"(", "[", "{"}  )
				SCREAMING_SNAKE_CASE__     							=				set({")", "]", "}"}  )
				SCREAMING_SNAKE_CASE__     							=				{"{": "}", "[": "]", "(": ")"}

				for i in range(len(lowerCamelCase_  )  ):
								if s[i] in open_brackets:
												stack.append(s[i]  )

								elif s[i] in closed_brackets and (
								    len(lowerCamelCase_  ) == 0 or (len(lowerCamelCase_  ) > 0 and open_to_closed[stack.pop()] != s[i])
								):
												return False

				return len(lowerCamelCase_  ) == 0


def __lowercase     (      ):
				SCREAMING_SNAKE_CASE__     							=				input("Enter sequence of brackets: "  )
				if is_balanced(lowerCamelCase_  ):
								print(lowerCamelCase_						,					"is balanced"  )
				else:
								print(lowerCamelCase_						,					"is not balanced"  )


if __name__ == "__main__":
	main()
