summaryrefslogtreecommitdiffstats
path: root/skripti/davčna.py
diff options
context:
space:
mode:
Diffstat (limited to 'skripti/davčna.py')
-rwxr-xr-xskripti/davčna.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/skripti/davčna.py b/skripti/davčna.py
new file mode 100755
index 0000000..89fe9f2
--- /dev/null
+++ b/skripti/davčna.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python3
+from sys import argv
+s = 0
+m = [x for x in range(2,9)]
+for z in argv[1]:
+ x = m.pop()
+ s += x * int(z)
+k = 11-s%11;
+if k > 9:
+ k = 0
+print(f"{argv[1]}{k}")