"""simple docstring"""


def       UpperCAmelCase					(	UpperCAmelCase      )       ->   int:
     barcode //= 10  # exclude the last digit
     snake_case_       =      False
     snake_case_       =      0

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

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







def       UpperCAmelCase					(	UpperCAmelCase      )       ->   bool:
     return len(str(UpperCAmelCase      )      ) == 13 and get_check_digit(UpperCAmelCase      ) == barcode % 10







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


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.""")


"""simple docstring"""


import math







def       UpperCAmelCase					(	UpperCAmelCase      )       ->   float:
     snake_case_       =      math.log(2		,      10      ) * number
     snake_case_       =      round((log_number - int(UpperCAmelCase      ))		,      15      )

     return difference







def       UpperCAmelCase					(	UpperCAmelCase = 678910      )       ->   int:
     snake_case_       =      90
     snake_case_       =      0

     snake_case_       =      math.log(1.23		,      10      )
     snake_case_       =      math.log(1.24		,      10      )
     snake_case_       =      0

     while position < number:
          snake_case_       =      log_difference(UpperCAmelCase      )

          if difference >= upper_limit:
               power_iterator += 93

          elif difference < lower_limit:
               power_iterator += 196

          else:
               snake_case_       =      power_iterator
               power_iterator += 196
               position += 1

     return previous_power


if __name__ == "__main__":
    import doctest

    doctest.testmod()

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

