



def 						__lowerCamelCase       (      __magic_name__	:  Optional[int]						):
							barcode //= 10  # exclude the last digit
							a__:       List[str]											=False
							a__:       Optional[Any]											=0

							# extract and check each digit
							while barcode != 0:
														a__:       Dict											=1 if checker else 3
														s += mult * (barcode % 10)
														barcode //= 10
														a__:       List[str]											=not checker

							return (10 - (s % 10)) % 10





def 						__lowerCamelCase       (      __magic_name__	:  Union[str, Any]						):
							return len(str(lowercase_						)						) == 13 and get_check_digit(lowercase_						) == barcode % 10





def 						__lowerCamelCase       (      __magic_name__	:  Tuple						):
							if str(lowercase_						).isalpha():
														a__:       Optional[int]											=F"Barcode \'{barcode}\' has alphabetic characters."
														raise ValueError(lowercase_						)
							elif int(lowercase_						) < 0:
														raise ValueError("The entered barcode has a negative value. Try again."						)
							else:
														return int(lowercase_						)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		__UpperCAmelCase						  =     get_barcode(input('''Barcode: ''').strip())

		if is_valid(barcode):
				print(f"""'{barcode}' is a valid barcode.""")
		else:
				print(f"""'{barcode}' is NOT a valid barcode.""")











def 						__lowerCamelCase       (      __magic_name__	:  list     , __magic_name__	:  int						):
							for index, item in enumerate(__magic_name__						):
														if item == target:
																					return index
							return -1





def 						__lowerCamelCase       (      __magic_name__	:  list     , __magic_name__	:  int     , __magic_name__	:  int     , __magic_name__	:  int						):
							if not (0 <= high < len(__magic_name__						) and 0 <= low < len(__magic_name__						)):
														raise Exception("Invalid upper or lower bound!"						)
							if high < low:
														return -1
							if sequence[low] == target:
														return low
							if sequence[high] == target:
														return high
							return rec_linear_search(__magic_name__     , low + 1     , high - 1     , __magic_name__						)


if __name__ == "__main__":
		__UpperCAmelCase						  =     input('''Enter numbers separated by comma:\n''').strip()
		__UpperCAmelCase						  =     [int(item.strip()) for item in user_input.split(''',''')]

		__UpperCAmelCase						  =     int(input('''Enter a single number to be found in the list:\n''').strip())
		__UpperCAmelCase						  =     linear_search(sequence, target)
		if result != -1:
				print(f"""linear_search({sequence}, {target}) = {result}""")
		else:
				print(f"""{target} was not found in {sequence}""")





