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