




from collections.abc import Callable



def 				_A  (		lowerCAmelCase_	:   Callable[[float], float]  ,							lowerCAmelCase_	:   float  ,							lowerCAmelCase_	:   float     ):
     """simple docstring"""

     lowerCAmelCase__            =					a
     lowerCAmelCase__            =					b
     if function(lowerCAmelCase_     ) == 0:  # one of the a or b is a root for the function
          return a
     elif function(lowerCAmelCase_     ) == 0:
          return b
     elif (
         function(lowerCAmelCase_     ) * function(lowerCAmelCase_     ) > 0
     ):  # if none of these are root and they are both positive or negative,
          # then this algorithm can't find the root
          raise ValueError("could not find root in given interval."     )
     else:
          lowerCAmelCase__            =					start + (end - start) / 2.0
          while abs(start - mid     ) > 10**-7:  # until precisely equals to 10^-7
               if function(lowerCAmelCase_     ) == 0:
                    return mid
               elif function(lowerCAmelCase_     ) * function(lowerCAmelCase_     ) < 0:
                    lowerCAmelCase__            =					mid
               else:
                    lowerCAmelCase__            =					mid
               lowerCAmelCase__            =					start + (end - start) / 2.0
          return mid



def 				_A  (		lowerCAmelCase_	:   float     ):
     """simple docstring"""

     return x**3 - 2 * x - 5


if __name__ == "__main__":
     print(bisection(f, 1, 1000))

     import doctest

     doctest.testmod()


def 				__A(lowerCAmelCase			)		->					bool:

		"""simple docstring"""






		if not isinstance(lowerCAmelCase    ,	lowerCAmelCase			):
				raise ValueError("""check_bouncy() accepts only integer arguments"""			)
		_UpperCamelCase         =						str(lowerCAmelCase			)
		_UpperCamelCase         =						"""""".join(sorted(lowerCAmelCase			)			)
		return sorted_str_n != str_n and sorted_str_n[::-1] != str_n


def 				__A(lowerCAmelCase = 9_9			)		->					int:

		"""simple docstring"""






		if not 0 < percent < 1_0_0:
				raise ValueError("""solution() only accepts values from 0 to 100"""			)
		_UpperCamelCase         =						0
		_UpperCamelCase         =						1

		while True:
				if check_bouncy(lowerCAmelCase			):
						bouncy_num += 1
				if (bouncy_num / num) * 1_0_0 >= percent:
						return num
				num += 1


if __name__ == "__main__":
		from doctest import testmod

		testmod()
		print(F"""{solution(99)}""")



