Question

10. Use Herons formula to calculate the area of a triangle. In below formula, a, b, and c are the length of 3 sides of a tri
0 1
Add a comment Improve this question Transcribed image text
Answer #1
Hi, This is in Python. Please let me know if you need it in a different language.

a = float(input('Enter side 1 of a triangle: '))
b = float(input('Enter side 2 of a triangle: '))
c = float(input('Enter side 3 of a triangle: '))
s = (a + b + c) / 2
area = (s * (s - a) * (s - b) * (s - c)) ** 0.5
print('Area of triangle is ' + str(area))

Enter side 1 of a triangle: 3 Enter side 2 of a triangle: 4 Enter side 3 of a triangle: 5 Area of triangle is 6.0 Process fin

Add a comment
Answer #2
Float type is only required
source: Mobile
answered by: anonymous
Add a comment
Answer #3
a=float(input("Enter the value of a")) b=float(input("Enter the value of b")) c=float(input("Enter the value of c")) s=(a+b+c)*0.5 area=s*(s-a)*(s-b)*(s-c)**0.5 print(a)
answered by: anonymous
Add a comment
Know the answer?
Add Answer to:
10. Use Heron's formula to calculate the area of a triangle. In below formula, a, b,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT