Skip to content

Instantly share code, notes, and snippets.

@coderinboots
Created October 11, 2020 09:44
Show Gist options
  • Save coderinboots/0d88471fc63322dd8ab9015e8dba7da3 to your computer and use it in GitHub Desktop.
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
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