M1-Survey-Engine/tools/statistics/survey/IntegerQuestion.py

6 lines
190 B
Python

class IntegerQuestion:
def get_average(self, datas: list[int]):
return sum(datas) / len(datas)
def get_median(self, datas: list[int]):
return datas[len(datas) // 2]