



'''simple docstring'''


from __future__ import annotations







def 				__lowerCamelCase				(   A__    ,						A__    )       ->	bool:






   """simple docstring"""
   if len(A__    ) == 0:
      return False
   UpperCamelCase					=  len(A__    ) // 2
   if a_list[midpoint] == item:
      return True
   if item < a_list[midpoint]:
      return binary_search(a_list[:midpoint]    ,						A__    )
   else:
      return binary_search(a_list[midpoint + 1 :]    ,						A__    )


if __name__ == "__main__":
   _lowerCamelCase	:       List[str]      	=	input("Enter numbers separated by comma:\n").strip()
   _lowerCamelCase	:       Union[str, Any]      	=	[int(item.strip()) for item in user_input.split(",")]
   _lowerCamelCase	:       Union[str, Any]      	=	int(input("Enter the number to be found in the list:\n").strip())
   _lowerCamelCase	:       int      	=	"" if binary_search(sequence, target) else "not "
   print(f'''{target} was {not_str}found in {sequence}''')








from __future__ import annotations

from decimal import Decimal
from math import *  # noqa: F403

from sympy import diff





def      lowerCAmelCase_ (       __a	,    __a	,    __a = 10**-10		)     ->		float:







  """simple docstring"""





  lowerCamelCase__:      str			  =a
  while True:
    lowerCamelCase__:      Optional[Any]			  =Decimal(__a		) - (
        Decimal(eval(__a		)		) / Decimal(eval(str(diff(__a		)		)		)		)  # noqa: S307
    )
    # This number dictates the accuracy of the answer
    if abs(eval(__a		)		) < precision:  # noqa: S307
      return float(__a		)


# Let's Execute
if __name__ == "__main__":
     # Find root of trigonometric function
     # Find value of pi
     print(f'The root of sin(x) = 0 is {newton_raphson("sin(x)", 2)}')
     # Find root of polynomial
     print(f'The root of x**2 - 5*x + 2 = 0 is {newton_raphson("x**2 - 5*x + 2", 0.4)}')
     # Find Square Root of 5
     print(f'The root of log(x) - 1 = 0 is {newton_raphson("log(x) - 1", 2)}')
     # Exponential Roots
     print(f'The root of exp(x) - 1 = 0 is {newton_raphson("exp(x) - 1", 0)}')

