How to calculate natural logarithm in Python

1 Answer

0 votes
import math 
  
print(math.log(10))
print(math.log(8))  
print(math.log(10, 2))  
print(math.log(0.4, 2))



'''
run:

2.302585092994046
2.0794415416798357
3.3219280948873626
-1.3219280948873622

'''

 



answered Jul 13, 2019 by avibootz
...