Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions demo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
"""
Demo module for circle area calculation.
"""

import math


def circle_area(radius):
"""Returns the area of the circle of given radius"""
pass # YOUR CODE HERE
"""
Calculate the area of a circle.

Args:
radius (int or float): Radius of the circle

Returns:
float: Area of the circle or 0 if radius is negative
"""
if radius < 0:
return 0

return math.pi * radius ** 2