Ask Question
4 January, 14:31

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.

+3
Answers (1)
  1. 4 January, 14:44
    0
    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 ()
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “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 ...” in 📗 Mathematics if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers