Articles

# Program to calculate circumference of circle in Python

In this python programming article, we will learn to write:

• program to calculate circumference of circle in python

### Python program to calculate circumference of circle

The program to calculate circumference of circle in python is as follows:

``````# Owner : TutorialsInhand Author : Devjeet Roy

circumference = (2 * 22 * r) / 7

print("The circumference is:", round(circumference,2)) ``````

The output of the python program to calculate circumference of circle is as follows :

``````PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
The circumference is: 31.43``````

1. As mentioned earlier, the input() function returns the user input in string format. We have used float() here to type convert the string to float type to perform mathematical computations.

2. The formula for finding the circumference of a circle is 2 x PIE x radius

Given below is snapshot for python program to find circumference of circle: Basic Python Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com 