diff --git a/solutions/python/square-root/1/square_root.py b/solutions/python/square-root/1/square_root.py new file mode 100644 index 0000000..d830970 --- /dev/null +++ b/solutions/python/square-root/1/square_root.py @@ -0,0 +1,16 @@ +"""Solution for Square Root.""" + +from math import sqrt + + +def square_root(number: float) -> int: + """ + Calculate square root. + + :param number: any number + :type number: float + :return: square root of any number, + only natural numbers (positive integers) as solutions. + :rtype: int + """ + return int(sqrt(number))