Skip to content

Commit 0e80903

Browse files
Merge pull request #2635 from LAbhilashKumar/square_root_improvement
square root improvement
2 parents a331a2a + 11cadef commit 0e80903

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)