Skip to content
Snippets Groups Projects
Commit 31c0c08d authored by Matteo Rossi's avatar Matteo Rossi
Browse files

Added docstring for square

parent 05273acc
No related branches found
No related tags found
No related merge requests found
......@@ -8,12 +8,18 @@ def sqrt(x):
>>> sqrt(4)
2.0
>>> sqrt(1.)
1.0
"""
return np.sqrt(x)
def square(x):
"""Evaluate the square of a number"""
"""
Evaluate the square of a number
>>> square(2)
4
>>> square(4.)
16.
"""
return x * x
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment