Average Mark

Imagine a list of marks where you need the average result without the decimal part. Write get_average, which takes a non-empty list marks, adds all the numbers, and divides the sum by the number of elements. The answer should be rounded down to an integer, so return the whole-number result.

Примеры

Ввод
[2, 2, 2, 2]
Вывод
2
Ввод
[1, 5, 87, 45, 8, 8]
Вывод
25
Ввод
[2, 2, 2, 1]
Вывод
1

Нужно реализовать

def get_average(marks: list[int]) -> int:

Теги

arraymath
PostgreSQLv16

Εδώ θα εμφανιστεί το αποτέλεσμα εκτέλεσης του κώδικα

Visible tests
1
Input
[2,2,2,2]
Expected2
2
Input
[1,5,87,45,8,8]
Expected25
3
Input
[2,2,2,1]
Expected1
4
Input
[1,2,3,4,5]
Expected3
5
Input
[10]
Expected10
6
Input
[10,10]
Expected10
Focus radio
Paused · SomaFM · Fluid