summaryrefslogtreecommitdiff
path: root/sample_notebooks/PRAVEENKUMAR C/PRAVEENKUMAR C_version_backup/CHAPTER_1.ipynb
blob: e2b145a85add4fdff12c1c5cdaf4e264410e70eb (plain)
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
{
 "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
}