Today we are going to share a Python program to find the area of triangle. If you are a python beginner and want to start learning the python programming, then keep your close attention in this tutorial as I am going to share a Python program to find the area of triangle.
To increase your Python knowledge, practice all Python programs:
Copy the below python program and execute it with the help of python compiler. This program will calculate the average of entered list of numbers.
1 2 3 4 5 6 7 |
import math a=int(input("Enter first side: ")) b=int(input("Enter second side: ")) c=int(input("Enter third side: ")) s=(a+b+c)/2 area=math.sqrt(s*(s-a)*(s-b)*(s-c)) print("Area of the triangle is: ",round(area,2)) |
Enter first side: 8
Enter second side: 8
Enter third side: 4
Area of the triangle is: 15.49
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.