






"""simple docstring"""
def        lowerCamelCase_  (						_lowerCamelCase				):
 barcode //= 10  # exclude the last digit
 lowerCamelCase__     :			int     				=						False
 lowerCamelCase__     :			Optional[Any]     				=						0

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

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






def        lowerCamelCase_  (						_lowerCamelCase				):
 return len(str(_lowerCamelCase				)				) == 13 and get_check_digit(_lowerCamelCase				) == barcode % 10






def        lowerCamelCase_  (						_lowerCamelCase				):
 if str(_lowerCamelCase				).isalpha():
  lowerCamelCase__     :			Optional[int]     				=						f'''Barcode \'{barcode}\' has alphabetic characters.'''
  raise ValueError(_lowerCamelCase				)
 elif int(_lowerCamelCase				) < 0:
  raise ValueError('The entered barcode has a negative value. Try again.'				)
 else:
  return int(_lowerCamelCase				)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      A_			: str				=			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"""
def        lowerCamelCase_  (						_lowerCamelCase				):
 return 1 if input_a == 0 else 0






def        lowerCamelCase_  (						):
 assert not_gate(0				) == 1
 assert not_gate(1				) == 0


if __name__ == "__main__":
      print(not_gate(0))
      print(not_gate(1))

