# Variables
T1 = 308 #K
T2 = 373. #K
T3 = 538. #K
# Calculations
e1 = (T2-T1)/T2
e2 = (T3-T1)/T3
# Results
print 'Efficiency = %.3f '%(e1)
print ' Efficiency = %.3f '%(e2)
# Variables
T = 25 #C
T1 = 0. #C
h = 79.8 #cal g**-1
j = 4.18*10**7 #ergs
# Calculations
Wc = (T-T1)*h/(273+T1)
W = (T-T1)*h*j/(273+T1)
# Results
print 'Work required = %.1f cal'%(Wc)
print ' Work required = %.2e ergs'%(W)
# Variables
import math
R = 1.98 #cal #mol K
x = 0.75
n = 9
# Calculations
dS = -R*(n*(x/n)*math.log(x/n)+(1-x)*math.log(1-x))
# Results
print 'Entropy = %.2f cal deg**-1 mole**-1'%(dS)