Created
October 11, 2020 09:44
-
-
Save coderinboots/0d88471fc63322dd8ab9015e8dba7da3 to your computer and use it in GitHub Desktop.
Python program to calculate the area of a triangle if we know all the sides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = 5 | |
b = 6 | |
c = 7 | |
s = (a + b + c) / 2 | |
print("Value of s -->", s) | |
area = (s * (s-a) * (s-b) * (s-c)) ** 0.5 | |
print("Area of triangle -->", area) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment