With the help of
cmath.pi constant, we can use this constant value in the calculation of area of circle, perimeter of circle and etc.
Return : Return the pi value.
Example #1 :
In this example we can see that by using
cmath.pi constant, we are able to drive the mathematical formulas very easily.
Example #2 :
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.