

def        __lowercase    (  UpperCAmelCase__		,					UpperCAmelCase__      ):

					"""simple docstring"""






					_validate_point(UpperCAmelCase__      )
					_validate_point(UpperCAmelCase__      )
					if len(UpperCAmelCase__      ) != len(UpperCAmelCase__      ):
										raise ValueError('Both points must be in the same n-dimensional space'      )

					return float(sum(abs(a - b      ) for a, b in zip(UpperCAmelCase__		,					UpperCAmelCase__      )      )      )


def        __lowercase    (  UpperCAmelCase__      ):

					"""simple docstring"""






					if point:
										if isinstance(UpperCAmelCase__		,					UpperCAmelCase__      ):
															for item in point:
																				if not isinstance(UpperCAmelCase__		,					(int, float)      ):
																									__lowerCAmelCase					=							(
																									    'Expected a list of numbers as input, found '
																									    F"""{type(UpperCAmelCase__      ).__name__}"""
																									)
																									raise TypeError(UpperCAmelCase__      )
										else:
															__lowerCAmelCase					=							F"""Expected a list of numbers as input, found {type(UpperCAmelCase__      ).__name__}"""
															raise TypeError(UpperCAmelCase__      )
					else:
										raise ValueError('Missing an input'      )


def        __lowercase    (  UpperCAmelCase__		,					UpperCAmelCase__      ):

					"""simple docstring"""






					_validate_point(UpperCAmelCase__      )
					_validate_point(UpperCAmelCase__      )
					if len(UpperCAmelCase__      ) != len(UpperCAmelCase__      ):
										raise ValueError('Both points must be in the same n-dimensional space'      )

					return float(sum(abs(x - y      ) for x, y in zip(UpperCAmelCase__		,					UpperCAmelCase__      )      )      )


if __name__ == "__main__":
		import doctest

		doctest.testmod()









def        __lowercase    (  UpperCAmelCase__		,					UpperCAmelCase__      ):

					"""simple docstring"""






					assert x is not None
					assert y is not None

					__lowerCAmelCase					=							len(UpperCAmelCase__      )
					__lowerCAmelCase					=							len(UpperCAmelCase__      )

					# declaring the array for storing the dp values
					__lowerCAmelCase					=							[[0] * (n + 1) for _ in range(m + 1      )]  # noqa: E741

					for i in range(1		,					m + 1      ):
										for j in range(1		,					n + 1      ):
															__lowerCAmelCase					=							1 if x[i - 1] == y[j - 1] else 0

															__lowerCAmelCase					=							max(l[i - 1][j]		,					l[i][j - 1]		,					l[i - 1][j - 1] + match      )

					__lowerCAmelCase					=							''
					__lowerCAmelCase,	__lowerCAmelCase					=							m, n
					while i > 0 and j > 0:
										__lowerCAmelCase					=							1 if x[i - 1] == y[j - 1] else 0

										if l[i][j] == l[i - 1][j - 1] + match:
															if match == 1:
																				__lowerCAmelCase					=							x[i - 1] + seq
															i -= 1
															j -= 1
										elif l[i][j] == l[i - 1][j]:
															i -= 1
										else:
															j -= 1

					return l[m][n], seq


if __name__ == "__main__":
		lowerCamelCase      				=     '''AGGTAB'''
		lowerCamelCase      				=     '''GXTXAYB'''
		lowerCamelCase      				=     4
		lowerCamelCase      				=     '''GTAB'''

		lowerCamelCase				,				lowerCamelCase      				=     longest_common_subsequence(a, b)
		print('''len =''', ln, ''', sub-sequence =''', subseq)
		import doctest

		doctest.testmod()






