About 1,810,000 results
Open links in new tab
  1. Calculate the Area of a TrianglePython | GeeksforGeeks

    Apr 29, 2025 · In this article, we will see how we can calculate the area of a triangle in Python. When the lengths of all three sides of the triangle are known, you can use Heron's Formula. …

  2. Python Programs to Calculate Area of Triangle - PYnative

    Apr 17, 2025 · In this article, we will explore different ways to calculate the Area and Perimeter of a Triangle using Python, with detailed explanations and examples. What is a Triangle? 1. How …

  3. How to Find the Area of the Triangle in Python - Python Guides

    May 29, 2024 · Find the Area of the Triangle in Python Using Heron’s Formula. Heron’s formal state that the area of the triangle with three different sides can be computed using the square …

  4. Python Program to Calculate the Area of a Triangle

    In this program, area of the triangle is calculated when three sides are given using Heron's formula. If you need to calculate area of a triangle depending upon the input from the user, …

  5. Object Oriented Python for area of triangle - Stack Overflow

    class poly: def __init__(self,a,b,c): self.a = a self.b = b self.c = c class triangle(poly): def get_area(self): s = (self.a + self.b + self.c) / 2 return float((s*(s-self.a)*(s-self.b)*(s-self.c))) ** …

  6. Python Program to find Area Of a Triangle - Tutorial Gateway

    If we know the length of three sides of a triangle, then we can calculate the area of a triangle using Heron’s Formula. Area of a Triangle = √(s*(s-a)*(s-b)*(s-c)) Where s = (a + b + c )/ 2 …

  7. python - Finding the Area of a Triangle using if else statements ...

    print("Triangle Area Program") print() a, b, c = eval(input("Enter three lengths separated by commas: ")) print() s = (a+b+c) / 2.0. area = sqrt(s*(s-a)*(s-b)*(s-c)) if a > b: a, b = b, a. if a > c: …

  8. Python program to find the area and perimeter of a triangle

    In this tutorial, I will show you how to find the area and perimeter of a triangle in Python. For calculating both area and perimeter, we need the values of the sides of the triangle. So, the …

  9. Calculating area and perimeter of triangle with Python?

    In this way you can reuse those small functions later anywhere in your script by just calling them and passing three parameters. For example: # calculate the sides. s = (a + b + c) / 2. # …

  10. Python Program to Calculate The Area of The Triangle - CodinGeek

    Sep 8, 2021 · In this article, we have covered how to find the area of the triangle using Heron’s formula and also the area of any right-angled triangle.

  11. Some results have been removed