area of a circle calculator code example
Example 1: calculate area of circle
import math
r = 50
a = r**2*math.pi
print(a)
Example 2: area of circle
Area of circle = Pi * r^2 (r stands for radius and ^2 means squared)
Example 3: calculate area of circle
3.14 * radius * radius = area
Example 4: calculate area of circle
function calcAreaOfCircle(radius){
return Math.PI * r **2
}
function calcAreaOfCircle(diameter){
return Math.PI * (diameter / 2) **2
}