Boltzmann Partition Function Python Format Float