Sunday, December 4, 2016

Python: Pi and Natural Logarithm

Command:

$ cat pi_and_natural_logarithm.py


Result:

import math

print 'Pi: %.30f' % math.pi
print 'e: %.30f' % math.e


Command:

$ python pi_and_natural_logarithm.py


Result:

Pi: 3.141592653589793115997963468544
e: 2.718281828459045090795598298428