Skip to content

Commit

Permalink
✨ Added root_square function
Browse files Browse the repository at this point in the history
  • Loading branch information
mgardzinski committed Apr 5, 2024
1 parent f0a4fef commit cc4c73f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions calculator/calculator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import math


def add(x, y):
"""Returns the sum of x and y."""
return x + y
Expand All @@ -24,3 +27,8 @@ def subtract(x, y):
def exponentiate(x, y):
"""Returns x raised to the power of y."""
return x**y


def root_square(x):
"""Returns the square root of x."""
return math.sqrt(x)

0 comments on commit cc4c73f

Please sign in to comment.