diff options
author | kinitrupti | 2017-05-12 18:40:35 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:40:35 +0530 |
commit | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch) | |
tree | 9806b0d68a708d2cfc4efc8ae3751423c56b7721 /sample_notebooks/PRAVEENKUMAR C/PRAVEENKUMAR C_version_backup/CHAPTER_1.ipynb | |
parent | 1b1bb67e9ea912be5c8591523c8b328766e3680f (diff) | |
download | Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2 Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip |
Revised list of TBCs
Diffstat (limited to 'sample_notebooks/PRAVEENKUMAR C/PRAVEENKUMAR C_version_backup/CHAPTER_1.ipynb')
-rwxr-xr-x | sample_notebooks/PRAVEENKUMAR C/PRAVEENKUMAR C_version_backup/CHAPTER_1.ipynb | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/sample_notebooks/PRAVEENKUMAR C/PRAVEENKUMAR C_version_backup/CHAPTER_1.ipynb b/sample_notebooks/PRAVEENKUMAR C/PRAVEENKUMAR C_version_backup/CHAPTER_1.ipynb new file mode 100755 index 00000000..e2b145a8 --- /dev/null +++ b/sample_notebooks/PRAVEENKUMAR C/PRAVEENKUMAR C_version_backup/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 +} |