Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 017dfb8

Browse files
Create Function_Task.py
1 parent e27311d commit 017dfb8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎Tasks/Function_Task.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import math
2+
3+
def calculate(radius):
4+
area = math.pi * radius**2
5+
return area
6+
7+
radius = float(input("Enter the radius of the circle: "))
8+
area = calculate(radius)
9+
print(f"The area of the circle with radius {radius} is: {area:.2f}")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /