Jul-26-2018, 10:29 PM
Write a function area_of_circle® which returns the area of a circle of radius r
As a refresher, the area of any circle is equal to the radius squared, multiplied by pi (where pi is 3.14159....).
Don’t forget to include the math module, where pi is defined.
I have submitted:
import math
def areaOfCircle®:
return math.pi*r**2
radius = int(input("What is the radius of your cirle?"))
print(areaOfCircle(radius))
The grader says I am unable to use input statements so I am at a lost for what to use instead... any help is appreciated
As a refresher, the area of any circle is equal to the radius squared, multiplied by pi (where pi is 3.14159....).
Don’t forget to include the math module, where pi is defined.
I have submitted:
import math
def areaOfCircle®:
return math.pi*r**2
radius = int(input("What is the radius of your cirle?"))
print(areaOfCircle(radius))
The grader says I am unable to use input statements so I am at a lost for what to use instead... any help is appreciated