{ "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": {} } ] }