Shared2018-02-13-153959.sagewsOpen in CoCalc
ISBN check
a=[3,5,4,0,9,2,7,8,5]
b=[3,5,4,0,9,7,8,2,5]
c=[3,5,4,0,9,7,2,8,5]

d=[1,2,3,4,5,6,7,8,9]

ad=[a[i]*d[i] for i in range(len(a))]
bd=[b[i]*d[i] for i in range(len(b))]
cd=[c[i]*d[i] for i in range(len(c))]

print sum(ad)%11
print sum(bd)%11
print sum(cd)%11
9 9 4