Find Height of a triangle using its sides | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Find Height of a triangle using its sides

24th Dec 2017, 7:37 AM
Rahul Thakur
Rahul Thakur - avatar
2 Answers
+ 1
a, b, c = int(input()), int(input()), int(input()) s = (a+b+c)/2 print((s*(s-a)*(s-b)*(s-c))**0.5)
24th Dec 2017, 9:02 AM
blackcat1111
blackcat1111 - avatar
0
One liner print((lambda a,b,c:(lambda s:(s*(s-a)*(s-b)*(s-c))**0.5)( (a+b+c)/2))( int(input()), int(input()), int(input())))
24th Dec 2017, 9:32 AM
VcC
VcC - avatar