{"id":22848,"date":"2021-09-29T22:32:24","date_gmt":"2021-09-29T17:02:24","guid":{"rendered":"https:\/\/python-programs.com\/?p=22848"},"modified":"2021-11-22T18:35:34","modified_gmt":"2021-11-22T13:05:34","slug":"python-program-for-minimum-height-of-a-triangle-with-given-base-and-area","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-minimum-height-of-a-triangle-with-given-base-and-area\/","title":{"rendered":"Python Program for Minimum Height of a Triangle with Given Base and Area"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Calculate Volume and Surface Area of Hemisphere<\/a>
\nGiven the area(a) and the base(b) of the triangle, the task is to find the minimum height so that a triangle of least area a<\/strong> and base b<\/strong> can be formed.<\/p>\n

Knowing the relationship between the three allows you to calculate the minimum height of a triangle with base “b” and area “a.”<\/p>\n

The relationship between area, base, and height:<\/p>\n

area = (1\/2) * base * height<\/strong><\/p>\n

As a result, height can be calculated as follows:<\/p>\n

height = (2 * area)\/ base<\/strong><\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given area = 6\r\nGiven base = 3<\/pre>\n

Output:<\/strong><\/p>\n

The minimum height so that a triangle of the least area and base can be formed =  4<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given area = 7\r\nGiven base = 5<\/pre>\n

Output:<\/strong><\/p>\n

The minimum height so that a triangle of the least area and base can be formed = 3<\/pre>\n

Program for Minimum Height of a Triangle with Given Base and Area in Python<\/h2>\n

Below are the ways to find the minimum height so that a triangle of least area a<\/strong> and base b<\/strong> can be formed:<\/p>\n