how to find area of a circle with circumference code example

Example 1: calculate area of circle

import math
r = 50
a = r**2*math.pi
print(a)

Example 2: how to find circumference of a circle

curcomfrance = pi * radius * 2

Example 3: circumference of circle

C = Pi * r * 2 (r stands for radius)

Or you could do this:
C = Pi * d (d stands for diameter)

Example 4: calculate area of circle

function calcAreaOfCircle(radius){
    return Math.PI * r **2
}
function calcAreaOfCircle(diameter){
  return Math.PI * (diameter / 2) **2
}

Example 5: how to find area of circle

def circle(radius):
	3.14 * radius * radius 
circle(12)

Tags:

Misc Example