Skip to content

Commit

Permalink
Update areatriangle.py
Browse files Browse the repository at this point in the history
make sqrt option more easy with import.math
  • Loading branch information
iterayush authored Oct 2, 2021
1 parent e04c92f commit 7807446
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/areatriangle.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python Program to find the area of triangle

import math
a = 5
b = 6
c = 7
Expand All @@ -13,5 +13,5 @@
s = (a + b + c) / 2

# calculate the area
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
area = (math.sqrt(s*(s-a)*(s-b)*(s-c)))
print('The area of the triangle is %0.2f' %area)

0 comments on commit 7807446

Please sign in to comment.