{"id":23680,"date":"2021-10-03T20:26:50","date_gmt":"2021-10-03T14:56:50","guid":{"rendered":"https:\/\/python-programs.com\/?p=23680"},"modified":"2021-11-22T18:33:26","modified_gmt":"2021-11-22T13:03:26","slug":"python-program-for-volume-and-surface-area-of-frustum-of-cone","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-volume-and-surface-area-of-frustum-of-cone\/","title":{"rendered":"Python Program for Volume and Surface Area of Frustum of Cone"},"content":{"rendered":"

Given the height, slant height, smaller and bigger radius of a frustum cone, the task is to find the volume and surface area of the frustum of a given cone in python.<\/p>\n

Frustum of a Cone :<\/strong><\/p>\n

A frustum in geometry is the portion of a solid (typically a cone or pyramid) that lies between one or two parallel planes that cut it.
\nThe portion of a solid between a plane parallel to the base and a right circular cone is known as the frustum of a cone.<\/p>\n

A right circular cone is shown below:<\/p>\n

After being cut by a plane parallel to its base, the right circular cone produces the following frustum:<\/p>\n

which has a circular base with radius R at the bottom, a circular upper portion with radius R height h, and a slant height l.<\/p>\n

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

volume of the frustum of a cone = 1\/3 * pi * h(r2<\/sup> + R2<\/sup> + r*R)<\/p>\n

The curved surface area of a frustum of a cone = pi * l(R+r)<\/p>\n

The total surface area of a frustum of a cone = pi * l(R+r) + pi(R2<\/sup> + r2<\/sup>)<\/p>\n

In which,<\/p>\n

r<\/strong> is the radius of the smaller circle<\/p>\n

R<\/strong> is the radius of the bigger circle<\/p>\n

l<\/strong> is the slant height of the frustum of a cone.<\/p><\/blockquote>\n

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

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

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

Given smaller radius = 3\r\nGiven bigger radius = 6\r\nGiven slant height = 8\r\nGiven height  = 10<\/pre>\n

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

The Volume of above given Frustum of Cone =  659.7344572538565\r\nThe curved surface area of the above given frustum of Cone =  226.1946710584651\r\nThe total surface area of the above given frustum of Cone :  367.5663404700058<\/pre>\n

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

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

Given smaller radius = 4\r\nGiven bigger radius = 7\r\nGiven slant height = 10\r\nGiven height = 15<\/pre>\n

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

The Volume of above given Frustum of Cone = 1460.8405839192537\r\nThe curved surface area of the above given frustum of Cone = 345.57519189487726\r\nThe total surface area of the above given frustum of Cone : 549.7787143782139<\/pre>\n

Program for Volume and Surface Area of Frustum of Cone in Python<\/h2>\n

Below are the ways to find the volume and surface area of the frustum of a given cone in python:<\/p>\n