





"""simple docstring"""




def 		UpperCAmelCase__						(	_UpperCAmelCase					,   _UpperCAmelCase   ):






  """simple docstring"""





  if len(lowerCamelCase__   ) < len(lowerCamelCase__   ):
    return levenshtein_distance(lowerCamelCase__					,   lowerCamelCase__   )

  if len(lowerCamelCase__   ) == 0:
    return len(lowerCamelCase__   )

  A_    :			List[Any]									=    list(range(len(lowerCamelCase__   ) + 1   )   )

  for i, ca in enumerate(lowerCamelCase__   ):
    A_    :			int									=    [i + 1]

    for j, ca in enumerate(lowerCamelCase__   ):
      # Calculate insertions, deletions and substitutions
      A_    :			List[str]									=    previous_row[j + 1] + 1
      A_    :			List[Any]									=    current_row[j] + 1
      A_    :			str									=    previous_row[j] + (ca != ca)

      # Get the minimum to append to the current row
      current_row.append(min(lowerCamelCase__					,   lowerCamelCase__					,   lowerCamelCase__   )   )

    # Store the previous row
    A_    :			Any									=    current_row

  # Returns the last element (distance)
  return previous_row[-1]


if __name__ == "__main__":
   lowerCamelCase_	:		List[str]         =   input('Enter the first word:\n').strip()
   lowerCamelCase_	:		Optional[int]         =   input('Enter the second word:\n').strip()

   lowerCamelCase_	:		List[str]         =   levenshtein_distance(first_word, second_word)
   print(F"Levenshtein distance between {first_word} and {second_word} is {result}")
from collections.abc import Callable

_SCREAMING_SNAKE_CASE     =     Callable[[float], float]  # type alias for a real -> real function
def 					__lowercase						(    lowerCamelCase__			,					lowerCamelCase__			,					lowerCamelCase__			,					)					->float:

  '''simple docstring'''




  a__  		=  float(lowerCamelCase__       )
  while True:
    try:
      a__  		=  prev_guess - function(lowerCamelCase__       ) / derivative(lowerCamelCase__       )
    except ZeroDivisionError:
      raise ZeroDivisionError("Could not find root"       ) from None
    if abs(prev_guess - next_guess       ) < 10**-5:
      return next_guess
    a__  		=  next_guess
def 					__lowercase						(    lowerCamelCase__       )					->float:

  '''simple docstring'''




  return (x**3) - (2 * x) - 5
def 					__lowercase						(    lowerCamelCase__       )					->float:

  '''simple docstring'''




  return 3 * (x**2) - 2


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

