On this Tutorial we will create a Simple Python Program which to calculate area and perimeter of circle of a given radius.
Program Instructions summary
- Getting radius of circle from user
- Computing the area of circle
- Computing the perimeter of circle
- Displaying Area and Perimeter of the circle
On determining the area and Perimeter of the circle we need to have the value of pi on our calculations.
On this simple program we are going to import pi from standard library
Running our Program
kalebu@kalebu-PC:~$ python3 circle.py Enter radius of circle: 50 The area of the circle is 7853.981633974483 The perimeter of the circle is 314.1592653589793
Hope you find this post interesting , don’t forget to subscribe to get more tutorials like this
In case of any suggestion or comment , drop it on the comment box and I will reply to you immediately.