# mathematical and physical constants, code0.2.py import numpy import numpy as np import scipy.constants as cst #--- Main program starts here. --- print('--- Mathematical and physical constants ---') print() print('--- Mathematical constants ---') print('e =',np.e) print('pi = ',cst.pi) print() print('--- Physical constants ---') print('c = ', cst.c) print('e = ', cst.e) print('h = ', cst.h) print('R = ', cst.N_A) print('\n--- 2018 CODATA Database ---') s = 'Boltzmann constant' print(s + ' = ', cst.physical_constants[s][0],' ',\ cst.physical_constants[s][1],' ',\ cst.physical_constants[s][2]) s = 'vacuum electric permittivity' print(s + ' = ', cst.physical_constants[s][0],' ',\ cst.physical_constants[s][1],' ',\ cst.physical_constants[s][2])