6. Python Program to find Area and Circumference of a Circle.
How does this program work?
- In this program you will learn about how to calculate Area and Circumference of a Circle using Python.
- This program requires the user input to enter the radius of a circle.
- Area and Circumference of a circle can simply be evaluated using following formula and display the output.
Here is the code
pi = 3.14
radius = int(input('Enter the radius of a circle: '))
area = pi * radius * radius
circumference= 2 * pi * radius
print(" Area of a circle: " ,area)
print(" Circumference of a circle: %.2f" %circumference)