+ 1

How to write a program to find area of triangle using heron's formula?

2nd Aug 2020, 2:22 PM
Aniket Deshmukh
Aniket Deshmukh - avatar
2 Antworten
+ 7
Try it yourself. We'll not give you ready-made codes. We don't solve assignment homework or make codes. If you'll find any difficulty, you're free to ask. I was willing to give you some hints, but it's too simple. I'll give you the code in place of hints. So, please try it yourself. https://www.sololearn.com/discuss/1316935/?ref=app
2nd Aug 2020, 2:31 PM
Arctic Fox
Arctic Fox - avatar
0
I don't know if you are looking for a more complex solution, but it can be accomplished just by copying the formule in a python syntaxis and parsing the sides' sizes of the triangle as a parameter ' import math def triangeArea(a,b,c): s = (a + b + c)/2 return math.sqrt(s*(s-a)*(s-b)*(s-c)) print(triangeArea(5,5,5)) '
2nd Aug 2020, 2:34 PM
Agustin Melo
Agustin Melo - avatar