




"""simple docstring"""




class        UpperCAmelCase_  :
		def __init__(		self							,		UpperCamelCase_=None   )		->   str:
					__lowercase	:       int				=   data
					__lowercase	:       Optional[int]				=   None
		def __repr__(		self   )		->   List[str]:
					__lowercase	:       Any				=   ''''''
					__lowercase	:       Tuple				=   self
					while temp:
								string_rep += F"""<{temp.data}> ---> """
								__lowercase	:       Dict				=   temp.next
					string_rep += "<END>"
					return string_rep







def       __UpperCAmelCase      (				__UpperCamelCase					):

			# if elements_list is empty
			if not elements_list:
						raise Exception('''The Elements List is empty'''					)

			# Set first element as Head
			__lowercase	:       Optional[int]				=   Node(elements_list[0]					)
			__lowercase	:       List[str]				=   head
			# Loop through elements from position 1
			for data in elements_list[1:]:
						__lowercase	:       Dict				=   Node(__UpperCamelCase					)
						__lowercase	:       Dict				=   current.next
			return head


a_            =   [1, 3, 5, 3_2, 4_4, 1_2, 4_3]
print(F"List: {list_data}")
print('Creating Linked List from List.')
a_            =   make_linked_list(list_data)
print('Linked List:')


print(linked_list)









"""simple docstring"""




from collections.abc import Callable

a_            =   Callable[[float], float]  # type alias for a real -> real function







def       __UpperCAmelCase      (				__UpperCamelCase					,							__UpperCamelCase					,							__UpperCamelCase					,							):
			__lowercase	:       str				=   float(__UpperCamelCase					)
			while True:
						try:
									__lowercase	:       Dict				=   prev_guess - function(__UpperCamelCase					) / derivative(__UpperCamelCase					)
						except ZeroDivisionError:
									raise ZeroDivisionError('''Could not find root'''					) from None
						if abs(prev_guess - next_guess					) < 10**-5:
									return next_guess
						__lowercase	:       List[Any]				=   next_guess







def       __UpperCAmelCase      (				__UpperCamelCase					):
			return (x**3) - (2 * x) - 5







def       __UpperCAmelCase      (				__UpperCamelCase					):
			return 3 * (x**2) - 2


if __name__ == "__main__":
			print(newton(f, fa, 3))



