The energy in joules released for a particular Richter scale
     The energy in joules released for a particular Richter scale measurement is given by:  E = 10^(1.5 * r)+4.8  where E is energy measured in joules and r is the Richter scale measurement (typically on a scale from 1-10 as a floating point number). One ton of exploded TNT yields 4.184 times 10^9 joules. Thus, you can relate the energy released in joules to tons of exploded TNT.  For each of the following Richter scale measurements, your python script will perform the appropriate calculations and display the equivalent amount of energy in joules and in tons of exploded TNT using a series of print statements:  1.0  5.0  9.1 (Indonesia earthquake, 2004)  9.2 (Alaska earthquake, 1964)  9.5 (Chile earthquake, 1960; largest ever measured)  Your program will then prompt the user to enter a Richter scale measurement, accept a floating point value representing that measurement, perform the appropriate calculations, and display the equivalent amount of energy in joules and in tons of exploded TNT for that user-selected value. 
  
  Solution
(a) def tonTNT(r)
 E=10^((1.5*r1)+4.8)
 tnt=E/4.189*10^9
 print tnt
 return;
 r1=1.0
 tonTNT(r=r1)
 r2=5.0
 tonTNT(r=r1)
 r3=9.1
 tonTNT(r=r1)
 r3=9.2
 tonTNT(r=r1)
 r4=9.5
 tonTNT(r=r1)
(b)r=raw_input(\"\  Enter the Richter scale:\")
 def tonTNT(r)
 E=10^((1.5*r1)+4.8)
 tnt=E/4.189*10^9
 print \"Energy=\",E
 print \"No.of TNT tons=\",tnt
 return;
 tonTNT(r)

