Python Program to Find Surface Area of Cone
This Python program calculates surface area of cone given radius and height.
Surface area of cone calculated by using following formula:
A = πr ( r + √(r2 + h2) )
Python Source Code: Cone Area
To find surface area of cone, in this Python program, we first read radius and height of cone from user and then we apply above formula.
# Objective: Python program to calculate surface area of cone
# Author: Codesansar
# importing math to use sqrt() function
import math
# Reading radius
radius = float(input("Enter radius of cone: "))
# Reading height
height = float(input("Enter height of cone: "))
# Calculating surface area of cone
area = 3.141592 * radius * (radius + math.sqrt(radius*radius + height*height))
# Displaying area
print("Surface area = ", area)
Output
Enter radius of cone: 8 Enter height of cone: 12 Surface area = 563.531361362799