Python Program to Calculate the Area of a Triangle

Python Program to Calculate the Area of a Triangle

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn  Python programming concepts. You can learn Python language at your own speed and time. One can learn concepts of Python language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Python Program to Calculate the Area of a Triangle
Python Program to Calculate the Area of a Triangle

Write a Python Program to Calculate the Area of a Triangle

PROGRAM: Python Program to Calculate the Area of a Triangle

/* Python Program to Calculate the Area of a Triangle */
a = 5
b = 6
c = 7
s = (a + b + c) / 2
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
print('The area of the triangle is %0.2f' %area)

OUTPUT:-
The area of the triangle is 14.70

Leave a Reply

Your email address will not be published. Required fields are marked *