{"id":23800,"date":"2021-10-03T20:32:01","date_gmt":"2021-10-03T15:02:01","guid":{"rendered":"https:\/\/python-programs.com\/?p=23800"},"modified":"2021-11-22T18:33:25","modified_gmt":"2021-11-22T13:03:25","slug":"python-program-for-maximum-area-of-quadrilateral","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-maximum-area-of-quadrilateral\/","title":{"rendered":"Python Program for Maximum Area of Quadrilateral"},"content":{"rendered":"

Given four sides of a quadrilateral, the task is to get the maximum area of the given quadrilateral for the given four sides in python.<\/p>\n

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

In geometry, a quadrilateral is a closed shape formed by joining four points, any three of which are non-collinear. A quadrilateral is made up of four sides, four angles, and four vertices. The term ‘quadrilateral’ is derived from the Latin words ‘quadra’ (four) and ‘Latus’ (sides). A quadrilateral’s four sides may or may not be equal.<\/p>\n

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

The formula to calculate the maximum area of the given quadrilateral is :<\/p>\n

\"K={sqrt<\/p>\n

This is known as\u00a0 Brahmagupta’s Formula.<\/p>\n

s=(a+b+c+d)\/2<\/strong><\/p>\n

where a, b, c, d are the four sides of a quadrilateral.<\/p><\/blockquote>\n

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

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

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

Given first side = 2\r\nGiven second side = 1\r\nGiven third side =  3\r\nGiven fourth side =  4<\/pre>\n

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

The maximimum area of quadrilateral for the given four sides { 2 , 1 , 3 , 4 } =  4.898979485566356<\/pre>\n

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

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

Given first side = 5\r\nGiven second side = 3\r\nGiven third side = 5\r\nGiven fourth side = 2<\/pre>\n

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

The maximimum area of quadrilateral for the given four sides { 5 , 3 , 5 , 2 } =  12.43734296383275<\/pre>\n

Program for Maximum Area of Quadrilateral in Python<\/h2>\n

Below are the ways to get the maximum area of the given quadrilateral for the given four sides in python:<\/p>\n