formula for the area of a circle code example
Example 1: calculate area of circle
import math
r = 50
a = r**2*math.pi
print(a)
Example 2: area of a circle
def circle(radius):
return radius * math.pi * 2
import math
r = 50
a = r**2*math.pi
print(a)
def circle(radius):
return radius * math.pi * 2