Skip to content

Commit 993c4c0

Browse files
Create circle.py
1 parent 09c5814 commit 993c4c0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

circle.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import math
2+
3+
def circle_properties(radius):
4+
area = math.pi * radius * radius
5+
circumference = 2 * math.pi * radius
6+
return area, circumference
7+
8+
9+
# Example usage
10+
r = 5
11+
area, circumference = circle_properties(r)
12+
13+
print("Radius:", r)
14+
print("Area:", round(area, 2))
15+
print("Circumference:", round(circumference, 2))

0 commit comments

Comments
 (0)