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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 1: Chemistry The Study of Change"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.1: Computation_of_density_from_mass_and_volume.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Computation of density from mass and volume\n",
"\n",
"clear;\n",
"clc;\n",
"\n",
"printf('\t Example 1.1\n');\n",
"\n",
"m=301;//mass of gold, g\n",
"v=15.6;// volume of gold, cm^3\n",
"\n",
"d=m/v;//density of gold, g/cm^3\n",
"\n",
"printf('\t the density of gold is : %4.1f g/cm^3\n',d);\n",
"\n",
"\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.2: Computation_of_mass_from_density_and_volume.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Computation of mass from density and volume\n",
"\n",
"clear;\n",
"clc;\n",
"\n",
"printf('\t Example 1.2\n');\n",
"\n",
"d=13.6;//density of mercury, g/ml\n",
"v=5.50;// volume of mercury, ml\n",
"\n",
"m=d*v;//mass of mercury, g\n",
"\n",
"printf('\t the mass of mercury is : %4.1f g\n',m);\n",
"\n",
"\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.3: Conversion_among_temperature_scales.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Conversion among temperature scales\n",
"\n",
"clear;\n",
"clc;\n",
"\n",
"printf('\t Example 1.3\n');\n",
"\n",
"//for Solder\n",
"\n",
"C=224;//melting point of solder, C\n",
"F=C*9/5+32;//melting point of solder, F\n",
"\n",
"printf('\t the melting point of solder is : %4.0f F\n',F);\n",
"\n",
"\n",
"//for Helium\n",
"\n",
"F=-452;//boiling point of helium, F\n",
"C=(F-32)*5/9;//boiling point of helium, C\n",
"\n",
"printf('\t the boiling point of helium is : %4.0f C\n',C);\n",
"\n",
"\n",
"//for Mercury\n",
"\n",
"C=-38.9;//meltiing point of mercury, C\n",
"K=C+273.15;//meltiing point of mercury, K\n",
"\n",
"printf('\t the meltiing point of mercury is : %4.2f K\n',K);\n",
"\n",
"//End\n",
""
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.5: Significant_figures.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Significant figures\n",
"\n",
"clear;\n",
"clc;\n",
"\n",
"printf('\t Example 1.5\n');\n",
"\n",
"//(a)\n",
"A=11254.1;//g\n",
"B=0.1983;//g\n",
"C=A+B;//g\n",
"\n",
"printf('\t(a) ( %5.1f + %1.4f )g = %6.1f g\n',A,B,C);\n",
"\n",
"//(b)\n",
"A=66.59;//L\n",
"B=3.113;//L\n",
"C=A-B;//L\n",
"\n",
"printf('\t(b) ( %5.2f - %1.4f )L = %6.2f L\n',A,B,C);\n",
"\n",
"//(c)\n",
"A=8.16;//m\n",
"B=5.1355;\n",
"C=A*B;//m\n",
"\n",
"printf('\t(c) %5.2f m * %1.4f = %6.1f m\n',A,B,C);\n",
"\n",
"//(d)\n",
"A=0.0154;//kg\n",
"B=88.3;//mL\n",
"C=A/B;//kg/mL\n",
"\n",
"printf('\t(d) %1.4f kg / %2.1f mL = %1.2f *10^-4 kg/mL\n',A,B,C*10^4);\n",
"\n",
"//(e)\n",
"A=2.64*10^3;//cm\n",
"B=3.27*10^2;//cm\n",
"C=A+B;//cm\n",
"\n",
"printf('\t(e) ( %1.2f *10^3 + %1.2f *10^2 )cm = %1.2f *10^3 cm\n',A*10^-3,B*10^-2,C*10^-3);\n",
"\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.6: Dimensional_Analysis.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Dimensional Analysis\n",
"\n",
"clear;\n",
"clc;\n",
"\n",
"printf('\t Example 1.6\n');\n",
"\n",
"lb=0.0833;//pound mass, lb\n",
"\n",
"g=lb*453.6;//pound mass to gram mass, 1lb=453.6g\n",
"\n",
"mg=1000*g;//gram to milligram\n",
"\n",
"printf('\t the mass of glucose is : %1.2f *10^4 mg\n',mg*10^-4);\n",
"\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.7: Dimensional_Analysis.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Dimensional Analysis\n",
"\n",
"clear;\n",
"clc;\n",
"\n",
"printf('\t Example 1.7\n');\n",
"\n",
"L=5.2;//volume in litres\n",
"\n",
"cc=1000*L;//litre to cm^3\n",
"\n",
"mc=cc/10^6;//cm^3 to m^3\n",
"\n",
"printf('\t the volume of blood is : %4.1f *10^-3 m^3\n',mc*10^3);\n",
"\n",
"\n",
"//End"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.8: Dimensional_Analysis.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"// Dimensional Analysis\n",
"\n",
"clear;\n",
"clc;\n",
"\n",
"printf('\t Example 1.8\n');\n",
"\n",
"gpcc=0.808;//density in gram per cm^3\n",
"\n",
"kgpmc=1000*gpcc;//g/cm^3 to kg/m^3, as 1000g=1kg and 1cm=10^-2 m\n",
"\n",
"printf('\t the density of liquid nitrogen is : %3.0f kg/m^3\n',kgpmc);\n",
"\n",
"//End"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|