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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
{
"metadata": {
"name": "",
"signature": "sha256:064d55405a5d05f007b28f32cf39a9f99d10f303fc4084e2d14d99aaeb87858c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Physics of Nano Materials"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 8.1, Page number 320"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#import modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable decleration\n",
"r=5; #radius in m\n",
"pi=3.14;\n",
"\n",
"#Calculation \n",
"SA=4*pi*r**2; #surface area of sphere in m^2\n",
"V=(4/3)*pi*r**3; #volume of sphere in m^3\n",
"R=SA/V; #ratio\n",
"#surface area to volume ratio can also be given by 3/radius\n",
"\n",
"#Result\n",
"print(\"surface area to volume ratio of sphere in m-1 is\",R);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"('surface area to volume ratio of sphere in m-1 is', 0.6)\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 8.2, Page number 321"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#import modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable decleration\n",
"d=26; #distance in m\n",
"r=d/2; #radius in m\n",
"pi=3.14;\n",
"\n",
"#Calculation\n",
"SA=4*pi*r**2; #surface area of sphere in m^2\n",
"V=(4/3)*pi*r**3; #volume of sphere in m^3\n",
"R=SA/V; #ratio\n",
"R=math.ceil(R*10**3)/10**3; #rounding off to 3 decimals\n",
"#surface area to volume ratio can also be given by 3/radius\n",
"\n",
"#Result\n",
"print(\"surface area to volume ratio of sphere in m-1 is\",R);"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"('surface area to volume ratio of sphere in m-1 is', 0.231)\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 8.3, Page number 321"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#import modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable decleration\n",
"r=1; #radius in m\n",
"h=1; #height in m\n",
"pi=3.14\n",
"\n",
"#Calculation\n",
"V=(1/3)*pi*(r**2)*h;\n",
"V=math.ceil(V*10**2)/10**2; #rounding off to 2 decimals\n",
"\n",
"#Result\n",
"print(\"volume of cone in m^3 is\",V); "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"('volume of cone in m^3 is', 1.05)\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 8.4, Page number 321"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#import modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable decleration\n",
"r=3; # radius in m\n",
"h=4; # height in m\n",
"pi=3.14\n",
"\n",
"#Calculation\n",
"SA=pi*r*math.sqrt((r**2)+(h**2));\n",
"TSA=SA+(pi*r**2);\n",
"\n",
"#Result\n",
"print(\"total surface area of cone in m^2 is\",TSA);\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"('total surface area of cone in m^2 is', 75.36)\n"
]
}
],
"prompt_number": 16
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example number 8.5, Page number 322"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
" \n",
"#import modules\n",
"import math\n",
"from __future__ import division\n",
"\n",
"#Variable decleration\n",
"V=100; #volume of cone in cubic inches\n",
"r=5; #radius of cone in inches\n",
"pi=3.14;\n",
"\n",
"#Calculation\n",
"r_m=r*0.0254; #radius of cone in m\n",
"#volume V=(1/3)*pi*(r**2)*h\n",
"#therefore h = (3*V)/(pi*r**2)\n",
"h=(3*V)/(pi*r**2); #height in inches\n",
"R=3/r_m;\n",
"h=math.ceil(h*10**3)/10**3; #rounding off to 3 decimals\n",
"\n",
"#Result\n",
"print(\"height of the cone in inches is\",h);\n",
"print(\"surface area to volume ratio in m-1 is\",R);\n",
"\n",
"#answer for the surface area to volume ratio given in the book is wrong"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"('height of the cone in inches is', 3.822)\n",
"('surface area to volume ratio in m-1 is', 23.62204724409449)\n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|