summaryrefslogtreecommitdiff
path: root/analysis0619.py
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2023-07-01 00:51:36 +0800
committerKunoiSayami <[email protected]>2023-07-01 00:51:36 +0800
commitd95a40855ea8019186ca1fe558be210c67c1a3a0 (patch)
treee08b3b4ee82bc3381855d22679f4fa6ce5179f1a /analysis0619.py
parent4c9b48fc37bef199b20ee58aad34df62676b9091 (diff)
2023-07-01 00:51
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'analysis0619.py')
-rwxr-xr-xanalysis0619.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/analysis0619.py b/analysis0619.py
index ca1c2ff..b1288d2 100755
--- a/analysis0619.py
+++ b/analysis0619.py
@@ -62,6 +62,16 @@ def get_list_average(array: list[float | None]) -> float:
return reverse_decimal(sum(array) / len(array))
+def get_list_best(array: list[float]) -> float:
+ array.sort()
+ return array[0]
+
+
+def get_list_worst(array: list[float]) -> float:
+ array.sort()
+ return array[-1]
+
+
def analysis(data: dict[int, dict[int, dict[str, list[float]]]]) -> dict[int, dict[int, dict[str, float]]]:
new_dict = {}
for key, value in data.items():