Use the "import" statement to import the math package. "math.pi" function can get pi, so "math.pi" function can be used to express pi.
Examples are as follows:
The implementation results are as follows:
For more Python knowledge, please pay attention to: Python self-study network! !