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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 1: Introduction"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Example 1.1, Page Number: 6"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from __future__ import division\n",
"\n",
"\n",
"#Variable declaration:\n",
"Pi = 4200 #input power(W)\n",
"E = 120 #voltage supply of generator(V)\n",
"I = 32.2 #supply current(A)\n",
"\n",
"\n",
"#Calculation:\n",
"Po = E*I #output power(W)\n",
"n = Po/Pi*100 #efficiency(%)\n",
"Pl = Pi-Po #power lost(W)\n",
"El = Pl*60 #energy lost per minute(J)\n",
"\n",
"\n",
"#Result:\n",
"print \"The percentage efficiency of the generator is\",n,\"%\"\n",
"print \"Energy lost per minute of operation is\",El,\"J\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The percentage efficiency of the generator is 92.0 %\n",
"Energy lost per minute of operation is 20160.0 J\n"
]
}
],
"prompt_number": 2
}
],
"metadata": {}
}
]
}
|