- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Python Program for Find the perimeter of a cylinder

In this article, we will learn about the solution to the problem statement given below −

**Problem statement** − Input diameter and height, find the perimeter of a cylinder

Perimeter is nothing but the side view of a cylinder i.e. a rectangle

Therefore **Perimeter= 2 * ( h + d )**

here d is the diameter of the cylinder

h is the height of the cylinder

Now let’s see the implementation

## Example

# Function to calculate the perimeter of a cylinder def perimeter( diameter, height ) : return 2 * ( diameter + height ) # main diameter = 5 ; height = 10 ; print ("Perimeter = ",perimeter(diameter, height))

## Output

Perimeter = 30

All the variables and functions are declared in the global frame as shown in the figure below.

## Conclusion

In this article, we learned about finding the perimeter of a cylinder in Python 3.x. Or earlier.

- Related Questions & Answers
- Find the perimeter of a cylinder in Python Program
- Java Program to find the perimeter of a cylinder
- Find the perimeter of a cylinder in C++
- Program to find perimeter of a polygon in Python
- Java Program to Find the Perimeter of a Rectangle
- Java Program to Find the Perimeter of a Circle
- Program to find the perimeter of an island shape in Python
- Program to find the perimeter of a rhombus using diagonals
- Program to find largest perimeter triangle using Python
- C program to find the area of circle and cylinder using structures.
- C Program for Area And Perimeter Of Rectangle
- Program to find the Area and Perimeter of a Semicircle in C++
- Find Perimeter of a triangle in C++
- Program to Calculate the Perimeter of a Decagon in C program
- Python Program to Create a Class and Compute the Area and the Perimeter of the Circle

Advertisements