






"""simple docstring"""

def _lowerCAmelCase	(  __lowerCamelCase:Optional[Any]   ):

						'''simple docstring'''






						if bit_count < 0:
												raise ValueError("The given input must be positive"   )

						# get the generated string sequence
						__magic_name__            =     gray_code_sequence_string(_lowerCAmelCase   )
						#
						# convert them to integers
						for i in range(len(_lowerCAmelCase   )   ):
												__magic_name__            =     int(sequence[i] ,						2   )

						return sequence






def _lowerCAmelCase	(  __lowerCamelCase:Optional[int]   ):

						'''simple docstring'''






						if bit_count == 0:
												return ["0"]

						if bit_count == 1:
												return ["0", "1"]

						__magic_name__            =     1 << bit_count  # defines the length of the sequence
						# 1<< n is equivalent to 2^n

						# recursive answer will generate answer for n-1 bits
						__magic_name__            =     gray_code_sequence_string(bit_count - 1   )

						__magic_name__            =     []

						# append 0 to first half of the smaller sequence generated
						for i in range(seq_len // 2   ):
												__magic_name__            =     "0" + smaller_sequence[i]
												sequence.append(_lowerCAmelCase   )

						# append 1 to second half ... start from the end of the list
						for i in reversed(range(seq_len // 2   )   ):
												__magic_name__            =     "1" + smaller_sequence[i]
												sequence.append(_lowerCAmelCase   )

						return sequence


if __name__ == "__main__":
					import doctest

					doctest.testmod()











"""simple docstring"""

def _lowerCAmelCase	(  __lowerCamelCase:list ,						__lowerCamelCase:list   ):

						'''simple docstring'''






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

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






def _lowerCAmelCase	(  __lowerCamelCase:list[float]   ):

						'''simple docstring'''






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






def _lowerCAmelCase	(  __lowerCamelCase:list ,						__lowerCamelCase:list   ):

						'''simple docstring'''






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

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


if __name__ == "__main__":
			import doctest

			doctest.testmod()



