From ca342a20a367b89db09950d0e527f4fe488fe9d6 Mon Sep 17 00:00:00 2001 From: Kostanjevec Date: Fri, 29 Apr 2022 02:24:31 +0200 Subject: [PATCH] nardil prob. toy model. odkril problem ne-pickanja itemov --- test.py | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/test.py b/test.py index 1bfd104..0abb99a 100644 --- a/test.py +++ b/test.py @@ -1,10 +1,5 @@ -# item -## struktura from random import randint - - -title, due, interval = 2, 3, 4 - +# item #collection clltn = [] @@ -22,12 +17,11 @@ def generate_clltn (n_of_cards): return clltn # USER -deck_size = 20 +deck_size = 10 user_clltn = generate_clltn(100) max_new = 5 -print(user_clltn) - +# generate deck def get_new(user_clltn, n_of_cards): for card in user_clltn: pass @@ -42,10 +36,34 @@ def generate_deck(user_clltn, max_new, deck_size): #1 SR - super-memo style #2 Probabilistic +## problem je, da pri probabilističnem težko nardiš, da pač en dan ni nič v decku... +interest_rate_def = 0.5 + +def prob_eval(card): + title, due, interval = card #due je tukaj interest rate + + print("intrest rate je: ", due) + gumb = input("A te " + title + " zanima?") + if gumb == "y": + due = 0.99 + elif gumb == "m": + due = abs(due / 1.3) + else: + due = abs(due / 2) + + card_mod = title, due, interval + return card_mod # engine -current_deck = [] - +deck = [] +for c in range(deck_size): + deck.append(user_clltn[c]) +print(deck) +deck_mod = [] +for c in deck: + c = prob_eval(c) + deck_mod.append(c) +print(deck_mod)