From cfd8f3b899723bef98c2ab8ff0bb49e7ef9488b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Fri, 11 Sep 2020 00:46:33 +0200 Subject: [PATCH] average strategy with not fucked avg function --- strat/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strat/main.py b/strat/main.py index 70f604e..3ad2b2f 100644 --- a/strat/main.py +++ b/strat/main.py @@ -2,7 +2,10 @@ import numpy as np def avg(ls: list) -> int: - return sum(ls) / len(ls) + if len != 0: + return sum(ls) / len(ls) + else: + return 0 def decision(h1, h2):