Drop links or images here to add them to the editor.
Exercise 1.3.1 - Part 1
- Write a function that takes two arguments and returns their mean.
- Give your function a meaningful name, and a good documentation.
- Call your function multiple times with different values, and once using the keyword arguments with their associated values.
- Print the result of these different function calls.
In the same script, validate the correctness of your function by adding the following code:
mean_of_variables = mean_of_two_values(2, 5)
print(mean_of_variables)
Should give the output:
calculating the mean of 2 and 5
3.5
Beware Do not use Python built-in names for your variables and functions otherwise you will change their behaviour.