Python Program for Program to calculate area of a Tetrahedron Last Updated : 04 Apr, 2023 Comments Improve Suggest changes Like Article Like Report A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral faces, one on the bottom or the base and four vertices or corners. If the faces are all congruent equilateral triangles, then the tetrahedron is called regular. The volume of the tetrahedron can be found by using the following formula : Volume = a3/(6√2) Examples: Input : side = 3 Output : 3.18Input : side = 20 Output : 942.81 Python3 # Python code to find the volume of a tetrahedron import math def vol_tetra(side): volume = (side ** 3 / (6 * math.sqrt(2))) return round(volume, 2) # Driver Code side = 3 vol = vol_tetra(side) print(vol) Output3.18 Time complexity: O(1) since no loop is used the algorithm takes up constant time to perform the operationsAuxiliary Space: O(1) since no extra array is used so the space taken by the algorithm is constant Approach: In order to calculate the area of a tetrahedron, we need to know the length of one of its sides. Once we have the length of the side, we can use the following formula to calculate the area:area = sqrt(3) * s^2 where s is the length of the side of the tetrahedron. Steps: Take the input of the length of the side of the tetrahedron.Calculate the area using the formula.Print the calculated area. Python3 import math def calculate_tetrahedron_area(side): area = math.sqrt(3) * side ** 2 / 4 return round(area, 2) # Example usage: side = 3 area = calculate_tetrahedron_area(side) print("The area of a tetrahedron with side", side, "is", area) OutputThe area of a tetrahedron with side 3 is 3.9 Time Complexity: O(1) Auxiliary Space: O(1) Please refer complete article on Program to calculate area of a Tetrahedron for more details! Comment More infoAdvertise with us Next Article Python Program for Program to calculate area of a Tetrahedron K kartik Follow Improve Article Tags : Python Programs DSA area-volume-programs Similar Reads Calculate the Area of a Triangle - Python A triangle is a closed-shaped two-dimensional polygon having three sides and three corners. The corners are called vertices and the sides are called edges. In this article, we will see how we can calculate the area of a triangle in Python.Using Heron's FormulaWhen the lengths of all three sides of t 2 min read Python Program to Find Area of Rectangle The task of calculating the Area of a Rectangle in Python involves taking the length and width as input, applying the mathematical formula for the area of a rectangle, and displaying the result.Area of Rectangle Formula :Area = Width * HeightWhere:Length is the longer side of the rectangle.Width is 2 min read Calculate Surface Area and Volume of a Cylinder in Python Cylinders are common three-dimensional geometric shapes that can be found in various objects around us, from soda cans to industrial pipes. Understanding how to calculate their surface area and volume is essential in many fields, including engineering, physics, and computer science. In this article, 3 min read Python Program to find volume, surface area and space diagonal of a cuboid Given the length, base, and height of a cuboid. The task is to find the Surface Area, Volume and space diagonal of the cuboid. Examples: Input : length = 9 breadth = 6 height = 10 Output : Surface area = 408 volume = 540 space diagonal = 14.73 Input : length = 5 breadth = 4 height = 3 Output : surfa 2 min read Python Program to Check if right triangle possible from given area and hypotenuse A triangle is said to as having "right angles" if one of its angles is a right angle. The "legs" of a triangle are the two sides that cross over one another to make a right angle. The "hypotenuse" side of a triangle is the side that faces the right angle formed by the triangle. In this article, we'l 6 min read Like