Skip to content
Snippets Groups Projects
Commit 4f6f78cc authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Implement calculate_mean

parent 4a7ea4c7
No related branches found
No related tags found
No related merge requests found
Pipeline #1800 passed
...@@ -18,7 +18,7 @@ def whats_the_meaning_of_life(n_cores=23): ...@@ -18,7 +18,7 @@ def whats_the_meaning_of_life(n_cores=23):
You don't even have to ask the question, it will figure it out for you. You don't even have to ask the question, it will figure it out for you.
Don't use more cores than available to mankind. Don't use more cores than available to mankind.
Parameters Parameters
---------- ----------
n_cores: int [default: 23] n_cores: int [default: 23]
...@@ -30,3 +30,17 @@ def whats_the_meaning_of_life(n_cores=23): ...@@ -30,3 +30,17 @@ def whats_the_meaning_of_life(n_cores=23):
The type of the expected answer is of course an integer. The type of the expected answer is of course an integer.
""" """
return 42 return 42
def calculate_mean(numbers):
"""Calculates the mean of a list of numbers
Parameters
----------
numbers: iterable[numbers]
Returns
-------
number
"""
return sum(numbers) / len(numbers)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment