'''simple docstring'''





def 				__lowercase	(						lowerCamelCase__					)				->int:

  '''simple docstring'''




  barcode //= 10  # exclude the last digit
  a__     		=     False
  a__     		=     0

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

  return (10 - (s % 10)) % 10
def 				__lowercase	(						lowerCamelCase__					)				->bool:

  '''simple docstring'''




  return len(str(UpperCAmelCase_					)					) == 13 and get_check_digit(UpperCAmelCase_					) == barcode % 10
def 				__lowercase	(						lowerCamelCase__					)				->int:

  '''simple docstring'''




  if str(UpperCAmelCase_					).isalpha():
    a__     		=     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()
     _SCREAMING_SNAKE_CASE   						=    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 				__lowercase	(						lowerCamelCase__ ,				lowerCamelCase__					)				->Optional[int]:

  '''simple docstring'''




  sequence.append(lowerCamelCase__					)

  a__     		=     0
  while sequence[index] != target:
    index += 1

  sequence.pop()

  if index == len(lowerCamelCase__					):
    return None

  return index


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

     _SCREAMING_SNAKE_CASE   						=    input("""Enter a single number to be found in the list:\n""")
     _SCREAMING_SNAKE_CASE   						=    int(target_input)
     _SCREAMING_SNAKE_CASE   						=    sentinel_linear_search(sequence, target)
     if result is not None:
          print(F"""{target} found at positions: {result}""")
     else:
          print("""Not found""")

