Skip to content

Commit 11cadef

Browse files
committed
square root improvement
1 parent f5d5080 commit 11cadef

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

square_root.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import math
2+
3+
def square_root(number):
4+
if number >=0:
5+
print(f"Square root {math.sqrt(number)}")
6+
else:
7+
print("Cannot find square root for the negative numbers..")
8+
while True:
9+
square_root(int(input("enter any number")))

0 commit comments

Comments
 (0)