Skip to content

Latest commit

 

History

History
38 lines (20 loc) · 646 Bytes

Get_the_mean_of_an_array.md

File metadata and controls

38 lines (20 loc) · 646 Bytes

CodeWars Python Solutions


Get the mean of an array

It's the academic year's end, fateful moment of your school report. The averages must be calculated. All the students come to you and entreat you to calculate their average for them. Easy ! You just need to write a script.

Return the average of the given array rounded down to its nearest integer.

The array will never be empty.


Given Code

def get_average(marks):
    pass

Solution

def get_average(marks):
    return sum(marks) // len(marks)

See on CodeWars.com