Python Math Module

Python math module provides built in methods to perform mathematical operations.

max() and min()

max() and min() function allow us to get maximum an minimum number.

OUTPUT:

pow()

pow() function allow us to get the power of given number.

OUTPUT:

Pow = 64

sqrt()

sqrt() function allows us to get the square root of given number.

OUTPUT:
Pow = 8.0

trunc()

trunc() function will extract integer part from the number.

OUTPUT:

floor()

floor() function will return smallest nearest round off integer number.

OUTPUT:

ceil()

ceil() function is just opposite of floor() function. ceil() will return nearest round off integer number.

OUTPUT:

isnan()

isnan() function will return True if current value is not a number.

OUTPUT:

Imran Khan

Specialist Master (Architect) with a passion for cutting-edge technologies like AEM (Adobe Experience Manager) and a proven track record of delivering high-quality software solutions.

  • Languages: Java, Python
  • Frameworks: J2EE, Spring, Struts 2.0, Hibernate
  • Web Technologies: React, HTML, CSS
  • Analytics: Adobe Analytics
  • Tools & Technologies: IntelliJ, JIRA

🌐 LinkedIn

📝 Blogs

📧 Imran Khan