Template for exercise solutions¶
Remove this heading
MDG Python course – Summer 2020¶
Exercise A1 – Solutions¶
Handed in by Jane Doe¶
1 Get your hands on a working installation of Python 3, install Jupyter, and open the exercise solution template.
Task 1 is completed successfully as this notebook is running.
2 Repeat the problem asked, so nobody has to look up the question for the following answer.
If your answer includes text, put it here.
You can include inline math in your answer: \(1 + 1 = 2\)
Or display style math:
\[F = \frac{q^2}{4\pi\epsilon_0r^2}\]
Include Python code snippets in code cells:
[1]:
new_value = 1 # Comment your code where appropriate
def user_function(*args):
"""In particular comment what your functions do
Args:
args: Takes an arbitrary number of arguments of any type.
Returns:
The number of arguments passed
"""
return len(args)
[2]:
print(
user_function(new_value, 1, True)
)
3