Advertisement
Guest User

Untitled

a guest
May 4th, 2016
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2.  
  3. working = 1
  4.  
  5. while working == 1 :
  6.    d1 = random.randint(0, 9)
  7.    d2 = random.randint(0, 9)
  8.    d3 = 7
  9.    d4 = random.randint(0, 9)
  10.    d5 = random.randint(5, 6)
  11.    d6 = random.randint(0, 9)
  12.    d7 = random.randint(0, 9)
  13.    d8 = random.randint(0, 9)
  14.    d9 = random.randint(0, 9)
  15.    d10 = random.randint(0, 9)
  16.    d11 = random.randint(0, 9)
  17.    d12 = random.randint(0, 9)
  18.    d13 = random.randint(0, 9)
  19.    
  20.    sum = (d1+d2+d3+d4+d5+d6+d7+d8+d9+d10+d11+d12)
  21.    
  22.    d14 = sum % 10
  23.    d15 = (d14+sum) / 10
  24.    d16 = (d14+sum) % 10
  25.    
  26.    value = d3*1000 + d5*100 + d8*10 + d13
  27.    if (value > 7580) and (value < 7695):
  28.       working = 0
  29.  
  30. key = str(d1) + str(d2) + str(d3) + str(d4)
  31. key = key + str(d5) + str(d6) + str(d7)+str(d8)
  32. key = key + str(d9) + str(d10) + str(d11)+str(d12)
  33. key = key + str(d13) + str(d14) + str(d15)+str(d16)
  34.  
  35. print "Your key: " + key
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement