asked 54.9k views
1 vote
Write a function called circle that takes a scalar input r. it needs to return an output called area that is the area of a circle with radius r and a second output, cf that is the circumference of the same circle. you are allowed to use the built-in function pi. in fact, you need to use it to get the value of π as accurately as possible.

1 Answer

1 vote
Ok so I'll demonstrate in programming language python.

import math
def circle():
r = float(input("Enter r: "))
a = math.pi * r ** 2
print("Area of circle with r = {0} is {1
}cm2".format(str(r), str(a))

circle()
answered
User Ilw
by
8.1k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.