From 3fed51e23753255ffc6e660aaacf926e8ac735e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 Feb 2023 00:15:03 +0100 Subject: raziskovalna naloga --- mat/fmf/fmf.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 mat/fmf/fmf.py (limited to 'mat/fmf') diff --git a/mat/fmf/fmf.py b/mat/fmf/fmf.py new file mode 100755 index 0000000..87a50c3 --- /dev/null +++ b/mat/fmf/fmf.py @@ -0,0 +1,23 @@ +#!/usr/bin/python3 +import numpy +a = "abcčdefghijklmnopqrsštuvwxyzžABCČDEFGHIJKLMNOPQRSŠTUVZŽ.,-" +u = "Y-TČTNŽOF-MQUWMA-FINF-METRRJJLIWUŠVZQŠ.X-Č-GNSSIGPŽKOUUZNMFF-MNYQCXATSUGGLZJNHKIEFVULLDZTUBRŠB-ČRQHUNPVQQGPOJ.BBAYČ.VMRXGČF-MOCJQPDLGAOSKELŠ-AIŠPKATOŠŽOLZRKWUUZNMFF-M-TRZFAWBŽVŠV_" +n = "Y-TČtNžof-mQUWMA-FINf-mEtRrJjLIWušvzQš.X-č-gnssIGPžkOuuzNmFf-mNYQcxatsuGGLzjNhkiEFvuLlDZtuBršb-ČrQHunpvqQgPOJ.bbaYč.vMrxgčf-mOcJQpDlGaoSKElš-aIšpkatOšžOLZrkwuuzNmFf-m-TrzFAwBžVŠV_" +t = "Matematika-je-kul." +if n.upper() != u: + raise Exception +k = [ + [1, 1, 1], + [0, 3, 1], + [2, 0, 1]] +v = [[], [], []] +s = -1 +for i in range(len(t)): + if s != i//3: + s = i//3 + for j in range(3): + v[j].append(-1) + v[i%3][i//3] = a.find(t[i]) +print(numpy.dot(k, v)) + +## ne znam matematike -- cgit v1.2.3