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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# CHAPTER 1:INTRODUCTION TO FLUID STATICS"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## SAMPLE PROBLEM 1/1,PAGE NUMBER:19"
]
},
{
"cell_type": "code",
"execution_count": 3,
"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(roundoff error)\n",
"The mass of the car in lbm,m= 3086.0 lbm(roundoff error)\n"
]
}
],
"source": [
"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\"\"(roundoff error)\"\n",
"print \"The mass of the car in lbm,m=\",round(m_2,0),\"lbm\"\"(roundoff error)\"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## SAMPLE PROBLEM 1/2,PAGE NUMBER:19"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The weight of a person by using Newton's Law of gravitation,W= 688.0 N\n",
"The weight of a person standing on the surface of the earth,W= 687.0 N\n"
]
}
],
"source": [
"import math\n",
"\n",
"#Variable Declaration\n",
"G=6.673* 10**-11;# m^3/(kg.s^2)\n",
"m_e=5.976* 10**24;# kg\n",
"R=6371*10**3;# m\n",
"m=70;# kg\n",
"g=9.81;# m/s^2\n",
"\n",
"#Calculation\n",
"W_n=(G*m_e*m)/R**2;# N\n",
"W=m*g;# N\n",
"print\"The weight of a person by using Newton's Law of gravitation,W=\",round(W_n,0),\"N\"\n",
"print\"The weight of a person standing on the surface of the earth,W=\",round(W,0),\"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
}
|