Added parition function compuation from exercise.
Added procesure for temps.