The area of a circle sector

from math import pi def deg2rad(theta_deg): return theta_deg * pi/180 def circle_sector_area(r, theta): return 0.5 * deg2rad(theta) * radius**2 radius, theta_deg = 10, 30 circle_area = pi * radius**2 full_circle_perc = theta_deg / float(360) sector_area = circle_sector_area(radius, theta_deg) sector_area_check = circle_area * full_circle_perc print(sector_area == sector_area_check) # True print(sector_area) # 26.1799387799 Formula to determine the area of a circle sector