We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 305d860 + 44eeee4 commit 557a684Copy full SHA for 557a684
area_of_square.py
@@ -1,9 +1,5 @@
1
# Returns the area of the square with given sides
2
-# Side length should eb given in input
3
-
4
-side = 2
5
-# side = float(input("Enter the side of the square: "))
6
7
-#calculate area
8
-area = side**2
9
-print(f"Area of the given square is {area}.")
+n=input("Enter the side of the square: ") # Side length should be given in input
+side = float(n)
+area = side * side #calculate area
+print("Area of the given square is ",area)
0 commit comments