summaryrefslogtreecommitdiff
path: root/Modern_Physics/chapter12_1.ipynb
blob: 4ab587925be248bd22081447a24c53775de43501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
 "metadata": {
  "name": "",
  "signature": "sha256:3ee27523440d66319c8d17b88b593002a8ca441a824b734c02da7b3a1165c0fa"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "12: Artificial Radioactivity"
     ]
    },
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Example number 12.1, Page number 247"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#import modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "r=0.5;      #ratio of mass of Pb206 and mass of U238\n",
      "t=4.5*10**9;     #half life(years)\n",
      "\n",
      "#Calculation\n",
      "T=(math.log(1+r))*(t/0.693);        #age(years)\n",
      "T=T/10**9;\n",
      "\n",
      "#Result\n",
      "print \"age of rock is\",round(T,2),\"*10**9 years\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "age of rock is 2.63 *10**9 years\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}