summaryrefslogtreecommitdiff
path: root/sample_notebooks/MonicaVenkatesh/Chapter_1.ipynb
blob: a8371dbdede3ef0e69f8afd5b7a046f19e8a0356 (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
{
 "metadata": {
  "name": "Chapter 1"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Chapter 1:Properties of Fluids"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 1.1,Page number 5"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "#variable initialisation\n\nw=500        #mass of liquid in N\n\ng=9.806      #gravity in m/s*2\n\ng1=3.5       #gravity in m/s*2\n\ng2=18.0      #gravity in m/s*2\n\n\n#Solution\n\nm=w/g        #mass\n\nprint \"a)m=\",round(m,2),\"kg\"\n\nw1=m*g1      #weight\n\nw2=m*g2\n\nprint \"b)w1=\",round(w1,2),\"N\"\n\nprint \"w2=\",round(w2,1),\"N\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "a)m= 50.99 kg\nb)w1= 178.46 N\nw2= 917.8 N\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "",
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}