summaryrefslogtreecommitdiff
path: root/Modern_Physics/chapter12.ipynb
diff options
context:
space:
mode:
authorhardythe12015-04-07 15:58:05 +0530
committerhardythe12015-04-07 15:58:05 +0530
commitc7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131 (patch)
tree725a7d43dc1687edf95bc36d39bebc3000f1de8f /Modern_Physics/chapter12.ipynb
parent62aa228e2519ac7b7f1aef53001f2f2e988a6eb1 (diff)
downloadPython-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.gz
Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.bz2
Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.zip
added books
Diffstat (limited to 'Modern_Physics/chapter12.ipynb')
-rwxr-xr-xModern_Physics/chapter12.ipynb63
1 files changed, 63 insertions, 0 deletions
diff --git a/Modern_Physics/chapter12.ipynb b/Modern_Physics/chapter12.ipynb
new file mode 100755
index 00000000..4ab58792
--- /dev/null
+++ b/Modern_Physics/chapter12.ipynb
@@ -0,0 +1,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": {}
+ }
+ ]
+} \ No newline at end of file