Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def circle_length(r: int):
- if r <= 0:
- raise Exception("radius cannot be negative")
- else:
- c = 2 * math.pi * r
- return round(c, 2)
- def circle_area(r: int):
- if r <= 0:
- raise Exception("radius cannot be negative")
- else:
- s = math.pi * r * r
- return round(s, 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement