Python3 Func Number Log10
# Python3.x Python3 log10() Function
[ Python3 Numbers](#)
* * *
## Description
The log10() method returns the base-10 logarithm of x, where x > 0.
* * *
## Syntax
Here is the syntax for the log10() method:
import math math.log10( x )
**Note:** log10() cannot be accessed directly; you need to import the math module and call the method via a static object.
* * *
## Parameters
* x -- A numeric expression.
* * *
## Return Value
Returns the base-10 logarithm of x, where x > 0.
* * *
## Example
The following example demonstrates the use of the log10() method:
#!/usr/bin/python3import math # Import the math moduleprint ("math.log10(100.12) : ", math.log10(100.12))print ("math.log10(100.72) : ", math.log10(100.72))print ("math.log10(119) : ", math.log10(119))print ("math.log10(math.pi) : ", math.log10(math.pi))
When the above program is run, it produces the following output:
math.log10(100.12) : 2.0005208409361854 math.log10(100.72) : 2.003115717099806 math.log10(119) : 2.075546961392531 math.log10(math.pi) : 0.4971498726941338
[ Python3 Numbers](#)
YouTip