##Chapter 5, Example 5.1, Page 103
import math
## Initial Kinetic energy
MRa = 226.025402
MRn = 222.017571
MHe = 4.00260325
C2 = 931.5
Ad = 222.
Aa = 4.
Q = (MRa-MRn-MHe)*C2
E = Q*(Ad/(Ad+Aa))
R = Q-E
print'%s %.2f %s'%("\n Q of the reaction = ",Q," MeV");
print'%s %.2f %s'%("\n Kinetic Enerfy of the reaction = ",E," MeV");
print'%s %.2f %s'%("\n The reminder of Q is the kinetic energy of the product nucleus,Rn = ",R," MeV");
## Answer may vary due to round off error
##Chapter 5, Example 5.2, Page 117
import math
##Probablility of decay by positron emission
##3 decay modes
LBp = 0.009497
LBm = 0.02129
LEC = 0.02381
L = LBp+LBm+LEC
P = LBp/L
print'%s %.2f %s'%("\n Probability of decay = ",P,"");
##Answer may vary due to round off error
##Chapter 5, Example 5.4, Page 127
import math
##Time takes for the activity of daughter is within 5% of that of parent
t = -math.log(1.-0.95)/(1.083*10**-2)
print'%s %.2f %s'%("\n Time = ",t," h ");
print'%s %.2f %s'%("\n Time = ",t/24," d ");
##Answer may vary due to round off error
##Chapter 5, Example 5.6, Page 129
import math
## Age of the wood
##based on eq 5.74
t = -(5730./math.log(2.))*math.log(1.2/6.4)
print'%s %.2f %s'%("\n Time = ",t," y ");
##Answer may vary due to round off error
##Chapter 5, Example 5.7, Page 129
import math
## Calculate the time
##based on eq 5.74
t = (14.05*10**9/math.log(2.))*math.log(1.+(0.31232/1.37208))
print'%s %.2e %s'%("\n Time = ",t," y ");
##Answer may vary due to round off error
##Chapter 5, Example 5.8, Page 130
import math
## Calculate the time
##based on eq 5.74
t = (4.88*10**10/math.log(2.))*math.log(1.+((0.80-0.710)/1.37208))
print'%s %.2e %s'%("\n Time = ",t," y ");
##Answer may vary due to round off error