diff options
Diffstat (limited to 'Chemistry_by_R_Chang/1-Chemistry_The_Study_of_Change.ipynb')
-rw-r--r-- | Chemistry_by_R_Chang/1-Chemistry_The_Study_of_Change.ipynb | 311 |
1 files changed, 311 insertions, 0 deletions
diff --git a/Chemistry_by_R_Chang/1-Chemistry_The_Study_of_Change.ipynb b/Chemistry_by_R_Chang/1-Chemistry_The_Study_of_Change.ipynb new file mode 100644 index 0000000..7151cb4 --- /dev/null +++ b/Chemistry_by_R_Chang/1-Chemistry_The_Study_of_Change.ipynb @@ -0,0 +1,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 +} |