Question: in python Write a function area_of_circle(r) which returns the area of a circle of radius r As a refresher, the area of any circle is

in python

Write a function area_of_circle(r) 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....).

Dont forget to include the math module, where pi is defined.

this is what i have so far kept getting error on line 8

import math

def area_of_circle(r):

# A=pir2

Area = math.pi * (r**2)

return Area

def main():

t = (int(input('radius')))

print(area_of_circle(t))

if _name_ == _'main'_

main():

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!