Fr 26. Sep 10:59:59 CEST 2025/py20250923iban001.py

# (C) David Vajda
# 09/23/25
# excersize python 3 - calculate the check sum - IBAN

IBAN092325 = "DE83 6414 0036 0891 2636 00"
BLZ = "12040000"

iban092325splitted = IBAN092325.split (" ")

print (iban092325splitted)
print ([BLZ[0:4], BLZ[4:8]])
iban092325splitted = iban092325splitted + [BLZ[0:4], BLZ[4:8]]
print (iban092325splitted)

t = 0
base = 0
for s in iban092325splitted[1:]:
    #print (s)
    x = int(s)
    while base > 0:
        if x / base > 0:
            break
        base = base / 10
    y = x * base
    #print (x)
    # y = x % 97
    z = x + t
    t = z % 97
    print (t)
    base = 10000
    # z = y * 1000
    # z = z + t