Created
April 26, 2016 05:50
-
-
Save vlas-ilya/b95e8e3befc5c704264d2d9c395b16c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import random | |
multipliers=[2, 4, 10, 3, 5, 9, 4, 6, 8] | |
N10=0 | |
result="" | |
random.seed() | |
for i in range(0, 9): | |
N = random.randint(0, 9) | |
result += str(N) | |
N10 += multipliers[i] * N | |
result += str(N10 % 11 % 10) | |
print "JuridicalPerson: " + result | |
multipliers1=[7, 2, 4, 10, 3, 5, 9, 4, 6, 8] | |
multipliers2=[3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8] | |
N11=0 | |
N12=0 | |
result="" | |
random.seed() | |
for i in range(0, 10): | |
N = random.randint(0, 9) | |
result += str(N) | |
N11 += multipliers1[i] * N | |
N12 += multipliers2[i] * N | |
N12 += multipliers2[10] * N11 | |
result += str(N11 % 11 % 10) + str(N12 % 11 % 10) | |
print "SelfEmployedPhysicalPerson: " + result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment