
"""simple docstring"""


class  lowerCAmelCase_ :



						'''simple docstring'''


						def __init__(       self   :					Dict     ,A_   :					list[int]					)   ->      None:
							A        =      len(A_					)
							A        =      [0] * len_array

							if len_array > 0:
								A        =      array[0]

							for i in range(1     ,A_					):
								A        =      self.prefix_sum[i - 1] + array[i]


						def   _SCREAMING_SNAKE_CASE					(       self   :					str     ,A_   :					int     ,A_   :					int					)   ->      int:
							if start == 0:
								return self.prefix_sum[end]

							return self.prefix_sum[end] - self.prefix_sum[start - 1]




						def   _SCREAMING_SNAKE_CASE					(       self   :					str     ,A_   :					int					)   ->      bool:
							A        =      {0}
							for sum_item in self.prefix_sum:
								if sum_item - target_sum in sums:
									return True

								sums.add(A_					)

							return False


if __name__ == "__main__":
		import doctest

		doctest.testmod()


def    __UpperCAmelCase (	__a      :			float	)			->     float:

					"""simple docstring"""

					return 10 - x * x



def    __UpperCAmelCase (	__a      :			float		,__a      :			float	)			->     float:

					"""simple docstring"""

					if equation(__a	) * equation(__a	) >= 0:
										raise ValueError('''Wrong space!'''	)

					_a	:    Dict         =		a
					while (b - a) >= 0.01:
										# Find middle point
										_a	:    Any         =		(a + b) / 2
										# Check if middle point is root
										if equation(__a	) == 0.0:
															break
										# Decide the side to repeat the steps
										if equation(__a	) * equation(__a	) < 0:
															_a	:    str         =		c
										else:
															_a	:    Union[str, Any]         =		c
					return c


if __name__ == "__main__":
			import doctest

			doctest.testmod()

			print(bisection(-2, 5))
			print(bisection(0, 6))



