From 1ef692eda733692f91fda857f4660d74b2872315 Mon Sep 17 00:00:00 2001 From: souvikmanik <58050233+souvikmanik@users.noreply.github.com> Date: Wed, 20 Oct 2021 02:04:36 +0530 Subject: [PATCH] Created circle _area_perimeter.py Write a menu-driven program to find the area and perimeter of a circle --- Python/circle_area_perimeter.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Python/circle_area_perimeter.py diff --git a/Python/circle_area_perimeter.py b/Python/circle_area_perimeter.py new file mode 100644 index 0000000..66396f1 --- /dev/null +++ b/Python/circle_area_perimeter.py @@ -0,0 +1,15 @@ +print("Program to find area and perimeter of a circle") +print("choose your desired option no") +print("1.Find perimeter") +print("2.Find area") +inp=int(input("enter the option number e.g. 1 or 2:")) +a=int(input("enter the radius of the circle:")) +if (inp==1): + perimeter=2*3.14*a + print("perimeter of the circle is:", perimeter) +elif (inp==2): + area=3.14*a**2 + print("Area of this circle is:", area) +else: + print("invalid input,please enter a number between 1 or 2") +