fogolydilemma/strat/main.py

15 lines
240 B
Python
Raw Normal View History

2020-09-11 00:56:04 +02:00
# Y8O353, E0HJQL
2020-09-11 00:27:55 +02:00
2020-09-11 03:00:39 +02:00
def avg(ls: list) -> int:
if len(ls) != 0:
return sum(ls) / len(ls)
else:
return 0
2020-09-11 00:45:03 +02:00
2020-09-11 03:00:39 +02:00
def decision(h1: list, h2: list) -> int:
if avg(h2[:4]) >= 0.05:
2020-09-11 01:53:13 +02:00
return 1
2020-09-11 00:27:55 +02:00
else:
2020-09-11 00:45:03 +02:00
return 0