Skip to content

Commit 557a684

Browse files
Merge pull request #1459 from implosion07/patch-1
Updated code
2 parents 305d860 + 44eeee4 commit 557a684

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

area_of_square.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# 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}.")
2+
n=input("Enter the side of the square: ") # Side length should be given in input
3+
side = float(n)
4+
area = side * side #calculate area
5+
print("Area of the given square is ",area)

0 commit comments

Comments
 (0)