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);
import math
# Variables
t = 27 #°C
# Calculations
T = t + 273.15 #K
# Result
print "Temperature in Kelvin = %.2f K"%(T)
# variables
T = 250 #K
# calculations
t = T - 273.15 #°C
# result
print "Temperature in °C = %.2f °C"%(t)
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))
# 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);
# 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))