Skip to content

Instantly share code, notes, and snippets.

@vlas-ilya
Created March 3, 2016 12:40
Show Gist options
  • Save vlas-ilya/478afc665c87108421d6 to your computer and use it in GitHub Desktop.
Save vlas-ilya/478afc665c87108421d6 to your computer and use it in GitHub Desktop.
#!/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