+

Python | constant cmath.tau

With the constant cmath.tau we can use this constant value when calculating mathematical formulas.

Syntax: cmath.tau
Return: Return the tau value.

Example # 1:
In this example, we can see that with the constant cmath.tau we can manipulate mathematical formulas very easily.

# import cmath library

import cmath

 
# using the constant cmath.pi

gfg = cmath.tau * cmath.pi

  

print (gfg)

Output:

19.739208802178716

Example # 2:

# import cmath library

import cmath

 
# using the constant cmath.tau

gfg = 2 * cmath.tau

 

print (gfg)

Output:

12. 566370614359172

Get Solution for free from DataCamp guru