






"""simple docstring"""







def 						lowercase__(A						)				->int:




						"""simple docstring"""



						barcode //= 10  # exclude the last digit
						lowercase__				:      Union[str, Any]=       False
						lowercase__				:      Union[str, Any]=       0

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

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





def 						lowercase__(A						)				->bool:




						"""simple docstring"""



						return len(str(A						)						) == 13 and get_check_digit(A						) == barcode % 10





def 						lowercase__(A						)				->int:




						"""simple docstring"""



						if str(A						).isalpha():
												lowercase__				:      str=       f'''Barcode \'{barcode}\' has alphabetic characters.'''
												raise ValueError(A						)
						elif int(A						) < 0:
												raise ValueError("The entered barcode has a negative value. Try again."						)
						else:
												return int(A						)


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			a :				int      					=		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.""")










'''simple docstring'''







import math






def       lowerCAmelCase__       (				lowerCamelCase     :			int   ):
       _A     :	int      =					math.log(2  ,10   ) * number
       _A     :	List[Any]      =					round((log_number - int(lowerCamelCase   ))  ,15   )

       return difference






def       lowerCAmelCase__       (				lowerCamelCase     :			int = 678910   ):
       _A     :	List[str]      =					90
       _A     :	List[Any]      =					0

       _A     :	List[str]      =					math.log(1.23  ,10   )
       _A     :	Any      =					math.log(1.24  ,10   )
       _A     :	Union[str, Any]      =					0

       while position < number:
              _A     :	Dict      =					log_difference(lowerCamelCase   )

              if difference >= upper_limit:
                     power_iterator += 93

              elif difference < lower_limit:
                     power_iterator += 196

              else:
                     _A     :	str      =					power_iterator
                     power_iterator += 196
                     position += 1

       return previous_power


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   print(f"""{solution() = }""")






