mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
17 lines
321 B
Python
17 lines
321 B
Python
"""Find mean of a list of numbers."""
|
|
|
|
|
|
def average(nums):
|
|
"""Find mean of a list of numbers."""
|
|
avg = sum(nums) / len(nums)
|
|
return avg
|
|
|
|
|
|
def main():
|
|
"""Call average module to find mean of a specific list of numbers."""
|
|
print(average([2, 4, 6, 8, 20, 50, 70]))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|