from scipy import stats
import matplotlib.pyplot as plt
import numpy as np
import math
#MEAN:
def MEAN(data):
    print(f"SADUSTATISTICS' MEAN RESULT: {sum(data.values()) / len(data)}")

def MODE(data):
    frequency = {}
    for score in data.values():
        if score in frequency:
            frequency[score] += 1
        else:
            frequency[score] = 1

    max_freq = max(frequency.values())
    mode = [score for score, freq in frequency.items() if freq == max_freq]
    print(f"SADUSTATISTICS' MODE RESULT: {mode}")


def MEDIAN(data):
    sorted_data = sorted(data.values())
    n = len(sorted_data)
    mid = n // 2
    print(f"SADUSTATISTICS' MEDIAN RESULT: {[sorted_data[mid] if n % 2 != 0 else (sorted_data[mid - 1] + sorted_data[mid]) / 2]}")
