Advertisement
vencinachev

Barcodes-1

Feb 19th, 2022
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. min_bar = int(input())
  2. max_bar = int(input())
  3. for barcode in range(min_bar, max_bar + 1):
  4.     digit1 = barcode % 10
  5.     barcode //= 10
  6.     digit2 = barcode % 10
  7.     barcode //= 10
  8.     digit3 = barcode % 10
  9.     barcode //= 10
  10.     digit4 = barcode % 10
  11.     if digit1 % 2 != 0 and digit2 % 2 != 0 and digit3 % 2 != 0 and digit4 % 2 != 0:
  12.         print(f'{digit4} {digit3} {digit2} {digit1}')
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement