summaryrefslogtreecommitdiff
path: root/Modern_Physics/Chapter16.ipynb
diff options
context:
space:
mode:
authornice2014-08-27 16:12:51 +0530
committernice2014-08-27 16:12:51 +0530
commit238d7e632aecde748a97437c2b5774e136a3b4da (patch)
treea05d96f81cf72dc03ceec32af934961cf4ccf7dd /Modern_Physics/Chapter16.ipynb
parent7e82f054d405211e1e8760524da8ad7c9fd75286 (diff)
downloadPython-Textbook-Companions-238d7e632aecde748a97437c2b5774e136a3b4da.tar.gz
Python-Textbook-Companions-238d7e632aecde748a97437c2b5774e136a3b4da.tar.bz2
Python-Textbook-Companions-238d7e632aecde748a97437c2b5774e136a3b4da.zip
adding book
Diffstat (limited to 'Modern_Physics/Chapter16.ipynb')
-rwxr-xr-xModern_Physics/Chapter16.ipynb62
1 files changed, 62 insertions, 0 deletions
diff --git a/Modern_Physics/Chapter16.ipynb b/Modern_Physics/Chapter16.ipynb
new file mode 100755
index 00000000..f8fb36e8
--- /dev/null
+++ b/Modern_Physics/Chapter16.ipynb
@@ -0,0 +1,62 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f4f136f0af18cf143b33cec13dfb6a06f3807644fa35b75af1bd5439584b255b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 16: Cosmology"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 16.1, page no. 15"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "c = 3.0 * 10 ** 5 #speed of light (km/s)\n",
+ "H0 = 20 * 10**-6 #(km/s/lightyear)\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rmax = c/(4*H0)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print \"The maximum distance at which the Hubble's law applies without relativistic correction is\",round(Rmax/10**9),\"X 10^9 lightyears.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum distance at which the Hubble's law applies without relativistic correction is 4.0 X 10^9 lightyears.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file