diff options
Diffstat (limited to 'sample_notebooks/PRAVEENKUMAR C/CHAPTER_1.ipynb')
-rw-r--r-- | sample_notebooks/PRAVEENKUMAR C/CHAPTER_1.ipynb | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/sample_notebooks/PRAVEENKUMAR C/CHAPTER_1.ipynb b/sample_notebooks/PRAVEENKUMAR C/CHAPTER_1.ipynb new file mode 100644 index 00000000..e2b145a8 --- /dev/null +++ b/sample_notebooks/PRAVEENKUMAR C/CHAPTER_1.ipynb @@ -0,0 +1,66 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The weight of a car in newton,W= 13734.0 N\n", + "The mass of the car in slugs,m= 95.9 slugs\n", + "The weight of the car in pounds,W= 3089.0 lb\n", + "The mass of the car in lbm,m= 3086.0 lbm\n" + ] + } + ], + "source": [ + "# CHAPTER 1:INTRODUCTION TO FLUID STATICS\n", + "# SAMPLE PROBLEM 1/1,PAGE NUMBER:19\n", + "\n", + "import math\n", + "\n", + "#Variable Declaration\n", + "m=1400; # Mass of car in kg\n", + "\n", + "#Calculation\n", + "g=9.81; # The acceleration due to gravity in m/s^2\n", + "W_1=m*g;# Weight in N\n", + "m_1=m/14.594;# Mass of the car in slugs (1slug=14.594kg)\n", + "g=32.2; # The acceleration due to gravity in ft/s^2\n", + "W_2=m_1*g;# Weight in pounds (lb)\n", + "m_2=m/0.45359; #Mass of the car in lbm\n", + "print \"The weight of a car in newton,W=\",round(W_1,0),\"N\"\n", + "print \"The mass of the car in slugs,m=\",round(m_1,1),\"slugs\"\n", + "print \"The weight of the car in pounds,W=\",round(W_2,0),\"lb\"\n", + "print \"The mass of the car in lbm,m=\",round(m_2,0),\"lbm\"\n", + "\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.11" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |