Surface Area of a Cone || Geometric Program || Python

In this we are going to see a basic program to calculate surface area of cone in Python Programming Language.


# 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,"sq units")
 
#Code by Shrinivas


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post