Differences

This shows you the differences between two versions of the page.

Link to this comparison view

user:jenda:ico [2015/04/27 18:17] (current)
jenda created
Line 1: Line 1:
 +====== Generátor IČO ======
  
 +<code python>
 +import random,math
 +
 +check=0
 +for i in list(reversed(range(2,​ 9))):
 +  num = math.floor(random.uniform(0,​ 10))
 +  check += i*num
 +  print(num, end=""​)
 +
 +check = (11 - check%11) % 10
 +print(check)
 +</​code>​
 +
 +http://​www.kolej.mff.cuni.cz/​~dan/​kody.html#​ICO
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki