What are the two constants available in math module? How are they used?

 

Answer:

The two constants available in math module are:

  • e = 2.718281... 
  • pi = 3.141592…

These are imported using the statements:

  • from math import pi
  • from math import e

Now they can be used directly in the program.

Example:

  • Area = pi * r * r
  • C = e**10
Remove Ads
Teachoo · Class 11 Explore Class 11
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.