Chapter 3 : Temperature and Heat

Example 3.1 Page No : 73

In [1]:
import math 
			
#Part(a)
print "Part a"
tf = 98.6 			#°F 			#average temperature Human Body in °C
tc = (tf - 32)/1.8 			#°C
print "Average human temperature in °C = %.1f °C"%(tc);


#Part(b)
print "Part b"
tc = 27 			#°C 			#Annual average temperature in peninsular India in °C
tf = 1.8*tc+32 			#Annual average temperature in peninsular India in °F
print "Annual average temperature in peninsular India in °F = %.1f °F"%(tf);
Part a
Average human temperature in °C = 37.0 °C
Part b
Annual average temperature in peninsular India in °F = 80.6 °F

Example 3.2 Page No : 73

In [2]:
import math 

# Variables
t = 27 			#°C 

# Calculations
T = t + 273.15 			#K

# Result
print "Temperature in Kelvin = %.2f K"%(T)
Temperature in Kelvin = 300.15 K

Example 3.3 Page No : 74

In [3]:
# variables
T = 250 			#K 

# calculations
t = T - 273.15 			#°C

# result
print "Temperature in °C = %.2f °C"%(t)
Temperature in °C = -23.15 °C

Example 3.4 Page No : 77

In [3]:
from numpy.linalg import solve
# Variables
X = solve([[1, 0, 0],[ 1, 100, 100**2],[ 1, 50, 50**2]],[[0], [100], [51]])

p = X[0]
q = X[1];
r = X[2];

def  t_A(t_B): 
    return  q*t_B + r*(t_B**2)
t_B = 30;

print "When thermometer B reads %0.1f C then thermometer A reads, t_B = %.02f degree C"%(t_B,t_A(t_B))
When thermometer B reads 30.0 C then thermometer A reads, t_B = 30.84 degree C

Example 3.5 Page No : 79

In [4]:
# variables

Rt = 80
t = 25

# calculations and results
#Substituting Rt and t in Rt = Ro(1+0.00395t)
Ro = 80/(1+0.00395*25)
print "Ro {Resistance at 0°C} = %.2f ohm"%(Ro)

#Full load condition
Rt = 95
#temperature at full load condition
print "t {Temperature at full load condition} = %.2f °C"%(((Rt/Ro)-1)/0.00395);
Ro {Resistance at 0°C} = 72.81 ohm
t {Temperature at full load condition} = 77.16 °C

Example 3.6 Page No : 80

In [2]:
# calculations
def  e(t): 
	 return  0.0367*t + 1.33 * 10**(-4)*t**2

# results
print "Thermometer read in place where gas thermometer reads 50°C = %.2f °C"%((e(50)/e(100)*100))
Thermometer read in place where gas thermometer reads 50°C = 43.35 °C