pi
The ratio of a circle's circumference to its diameter, about 3.14159, available in Python as math.pi.
In more detail
The course first defines its own global constant PI, then meets math.pi in the math module. Both are floats and so only approximate the true value.
Related terms
- constant — A name for a value that is set once and is not meant to change while the program runs.
- math module — The standard library module of mathematical functions and constants, such as sqrt, floor, ceil, sin and pi.
Taught in
- Local Scope And Global Constants — Hands-on Python: Complete Video Course & Book
- Modules And The Import System — Hands-on Python: Complete Video Course & Book
- A Standard Library Tour — Hands-on Python: Complete Video Course & Book