From fb0a4c357d62edb4e66091d37be4b2c0ff88a533 Mon Sep 17 00:00:00 2001 From: Shirsha Nag <154455132+shirshanag@users.noreply.github.com> Date: Fri, 11 Jul 2025 10:38:30 +0530 Subject: [PATCH 1/2] Create area_volume_cylinder.py --- area_volume_cylinder.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 area_volume_cylinder.py diff --git a/area_volume_cylinder.py b/area_volume_cylinder.py new file mode 100644 index 00000000..59cb5988 --- /dev/null +++ b/area_volume_cylinder.py @@ -0,0 +1,8 @@ +r=int(input("Enter the radius:")) +h=int(input("Enter the height:")) +def area(r,h): + return(2*3.14*r*h+2*3.14*r*r) +def vol(r,h): + return (3.14*r*r*h) +print(f"The Area:{area(r,h):.2f}") +print(f"The Volume:{vol(r,h):.2f}") From 28c9e096cd212c9892d0137895b82356c853f4d4 Mon Sep 17 00:00:00 2001 From: Shirsha Nag <154455132+shirshanag@users.noreply.github.com> Date: Fri, 11 Jul 2025 10:39:28 +0530 Subject: [PATCH 2/2] Create area_polygon.py --- area_polygon.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 area_polygon.py diff --git a/area_polygon.py b/area_polygon.py new file mode 100644 index 00000000..b2171401 --- /dev/null +++ b/area_polygon.py @@ -0,0 +1,6 @@ +n=float(input("Enter no of sides in polygon:")) +r = float(input("Enter the radius of an inscribed circle: ")) +l=float(input("Length of one side of the polygon:")) +def area(r): + return ((n/2)*l*r) +print(f"Area: {area(r):.2f}")