Quiz Question 1 of 5
A fellow programmer suggests optimizing the area.circle(radius)
function to also calculate the circumference. Which approach aligns best with the principles of clean code and modularity?
Choose the correct answer below:
-
A
Using the
math
module to extend thecircle
function for circumference calculation -
B
Creating a new function within the
area
module calledcircle_properties(radius)
that returns a dictionary containing both area and circumference -
C
Modifying the existing
circle
function to return both area and circumference -
D
Adding an optional parameter to the
circle
function to calculate the circumference if needed