Skip to content

Commit

Permalink
Merge pull request #1459 from implosion07/patch-1
Browse files Browse the repository at this point in the history
Updated code
  • Loading branch information
geekcomputers authored Jan 11, 2022
2 parents 305d860 + 44eeee4 commit 557a684
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions area_of_square.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Returns the area of the square with given sides
# Side length should eb given in input

side = 2
# side = float(input("Enter the side of the square: "))

#calculate area
area = side**2
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 comments on commit 557a684

Please sign in to comment.