#calculate the Change ine entropy
#Initialization of variables
import math
T2=100+273.2 #K
T1=50+273.2 #K
n=1 #mol
R=1.987 #cal/deg mol
#calculations
dS=5/2 *n*R*2.303*math.log10(T2/T1)
#results
print '%s %.3f %s' %("Change in entropy =",dS," eu")
#calculate the Entropy change
#Initialization of variables
H=380 #cal
T=273.2+32.1 #K
#calculations
dS=H/T
#results
print '%s %.2f %s' %("Entropy change =",dS," eu")
#calculate the Work done
#Initialization of variables
Ha=0
Hb=0
#calculations
H=Ha+Hb
q=H
U=0
w=q-H
#results
print '%s %d %s' %("Work done =",w,"J")
#calculate the change in entropy
#Initialization of variables
import math
prob=0.001
R=1.
N=6.023*10**23
#calculations
dS=1.987*2.303*math.log10(prob) /N
#results
print '%s %.1e %s' %("change in entropy =",dS," eu")
#calculate the Change in A
#Initialization of variables
T=373.2 #K
c=1.987 #cal/deg
#calculations
w=c*T
A=-w
#results
print '%s %d %s' %("Change in A =",A,"cal")