{"id":22859,"date":"2021-09-29T20:14:18","date_gmt":"2021-09-29T14:44:18","guid":{"rendered":"https:\/\/python-programs.com\/?p=22859"},"modified":"2021-11-22T18:35:35","modified_gmt":"2021-11-22T13:05:35","slug":"python-program-to-find-area-of-a-circular-segment","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-area-of-a-circular-segment\/","title":{"rendered":"Python Program to Find Area of a Circular Segment"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find the Center of the Circle using Endpoints of Diameter<\/a>
\nWhen a chord is drawn in a circle, it divides the circle into two parts. These two parts of the circle are known as circle segments. The smaller area is referred to as the Minor segment, while the larger area is referred to as the Major segment.<\/p>\n

Given the radius of the circle and the angle that forms a minor segment, the task is to find the areas of both major and minor segments of a circle.<\/p>\n

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

pi * r2 * (angle\/360) – 1\/2 * r2 * Sin(angle)<\/p><\/blockquote>\n

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

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

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

Given radius = 20\r\nGiven angle =  60 (degrees)<\/pre>\n

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

The minor segment area = 36.23434102950645\r\nThe major segment area = 1220.402189686826<\/pre>\n

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

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

Given radius = 10.5\r\nGiven angle =  45<\/pre>\n

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

The minor segment area = 4.315801733342639\r\nThe major segment area = 342.0447026361856<\/pre>\n

Program to Find Area of a Circular Segment in Python<\/h2>\n

Below are the ways to find the areas of both major and minor segments of a circle in Python:<\/p>\n