"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the current flowing through, and the p.d. across the 9 ohm resistor. \n",
"#Find also the power dissipated in the 11 ohm resistor.\n",
"from __future__ import division\n",
"#initializing the variables:\n",
"Vt = 12; # in volts\n",
"R1 = 4; # in ohms\n",
"R2 = 9; # in ohms\n",
"R3 = 11; # in ohms\n",
"\n",
"#calculation:\n",
"Rt = R1 + R2 + R3\n",
"I = Vt/Rt\n",
"V9 = I*R2\n",
"P11 = I*I*R3\n",
"#results\n",
"print \"a)current\", I,\"Amperes(A)\\n\"\n",
"print \"b)Voltage(V2)\", V9,\"Volts(V)\\n\"\n",
"print \"c)Power\", P11,\"Watt(W)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"a)current 0.5 Amperes(A)\n",
"\n",
"b)Voltage(V2) 4.5 Volts(V)\n",
"\n",
"c)Power 2.75 Watt(W)"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 4, page no. 44
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the value of voltage V\n",
"from __future__ import division\n",
"#initializing the variables:\n",
"Vt = 50; # in volts\n",
"R1 = 4; # in ohms\n",
"R2 = 6; # in ohms\n",
"\n",
"#calculation:\n",
"Rt = R1 + R2\n",
"I = Vt/Rt\n",
"V2 = I*R2\n",
"\n",
"#results\n",
"print \"Voltage(V)\", V2,\"Volts(V)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Voltage(V) 30.0 Volts(V)"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 5, page no. 45
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine (a) the value of the other resistor, and \n",
"#(b) the p.d. across the 2 \u0006 resistor. \n",
"#If the circuit is connected for 50 hours, how much energy is used?\n",
"from __future__ import division\n",
"#initializing the variables:\n",
"Vt = 24; # in volts\n",
"R1 = 2; # in ohms\n",
"I = 3; # in Amperes\n",
"t = 50; # in hrs\n",
"\n",
"#calculation:\n",
"V1 = I*R1\n",
"R2 = (Vt-(I*R1))/I\n",
"E = Vt*I*t\n",
"\n",
"#results\n",
"print \"a)Voltage(V1)\", V1,\"Volts(V)\\n\"\n",
"print \"b)Resistance(R2)\", R2,\"Ohms\\n\"\n",
"print \"c)Energy(E)\", E/1000,\"kWh\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"a)Voltage(V1) 6 Volts(V)\n",
"\n",
"b)Resistance(R2) 6.0 Ohms\n",
"\n",
"c)Energy(E) 3.6 kWh"
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 6, page no. 46
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine (a) the reading on the ammeter, and \n",
"# (b) the value of resistor R2\n",
"from __future__ import division\n",
"#initializing the variables:\n",
"R1 = 5; # in ohms\n",
"R3 = 20; # in ohms\n",
"I1 = 8; # in Amperes\n",
"It = 11; # in Amperes\n",
"\n",
"#calculation:\n",
"Vt = I1*R1\n",
"I3 = Vt/R3\n",
"R2 = Vt/(It - I1 - I3)\n",
"\n",
"#results\n",
"print \"a)Ammeter Reading\", I3,\"Amperes(A)\\n\"\n",
"print \"b)Resistance(R2)\", R2,\"Ohms\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"a)Ammeter Reading 2.0 Amperes(A)\n",
"\n",
"b)Resistance(R2) 40.0 Ohms"
]
}
],
"prompt_number": 6
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 7, page no. 46
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine (a) the total circuit resistance and (b) the current flowing in the 3 ohm resistor.\n",
"from __future__ import division\n",
"#initializing the variables:\n",
"R1 = 3; # in ohms\n",
"R2 = 6; # in ohms\n",
"Vt = 12; # in volts\n",
"\n",
"#calculation:\n",
"Rt = R1*R2/(R1 + R2)\n",
"I1 = (Vt/R1)\n",
"\n",
"#Result\n",
"print \"(a)Total Resistance\", Rt,\"Ohms\\n\"\n",
"print \"(b)Current(I1)\", I1,\"Amperes(A)\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Total Resistance 2.0 Ohms\n",
"\n",
"(b)Current(I1) 4.0 Amperes(A)"
]
}
],
"prompt_number": 7
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 8, page no. 47
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#find (a) the value of the supply voltage V and (b) the value of current I.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"R1 = 10;# in ohms\n",
"R2 = 20;# in ohms\n",
"R3 = 60;# in ohms\n",
"I2 = 3;# in Amperes\n",
"\n",
"#calculation:\n",
"Vt = I2*R2\n",
"I1 = Vt/R1\n",
"I3 = Vt/R3\n",
"I = I1 +I2 + I3\n",
"\n",
"print \"\\nResult\\n\"\n",
"print \"\\n(a)Voltage(V) \",Vt,\" Volts(V)\\n\"\n",
"print \"\\n(b)Total Current(I) \",I,\" Amperes(A)\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Result\n",
"\n",
"\n",
"(a)Voltage(V) 60 Volts(V)\n",
"\n",
"\n",
"(b)Total Current(I) 10.0 Amperes(A)"
]
}
],
"prompt_number": 9
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 9, page no. 47
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#state how they must be connected to give an overall resistance of \n",
"#(a) 1/4 ohm (b) 1 ohm (c) 4/3 ohm (d)2.5 ohm, all four resistors being connected in each case\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"R = 1;# in ohms\n",
"\n",
"#calculation\n",
"R1 = 1/(1/R + 1/R + 1/R + 1/R)\n",
"R2 = 2*R*2*R/(4*R)\n",
"R3 = 1/(1/R + 1/R + 1/R) + 1\n",
"R4 = R*R/(2*R) + 2*R\n",
"\n",
"print \"\\n\\nResult\\n\\n\"\n",
"print \"\\n(a)All four in parallel for \",R1,\" ohm\\n\"\n",
"print \"\\n(b)Two in series, in parallel with another two in series for\",R2,\" ohm\\n\"\n",
"print \"\\n(c)Three in parallel, in series with one for \",round(R3,2),\" ohm\\n\"\n",
"print \"\\n(d)Two in parallel, in series with two in series for \",R4,\" ohm\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Result\n",
"\n",
"\n",
"\n",
"(a)All four in parallel for 0.25 ohm\n",
"\n",
"\n",
"(b)Two in series, in parallel with another two in series for 1.0 ohm\n",
"\n",
"\n",
"(c)Three in parallel, in series with one for 1.33 ohm\n",
"\n",
"\n",
"(d)Two in parallel, in series with two in series for 2.5 ohm\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#State (a) the voltage across each lamp,\n",
"# and (b) the effect of lamp C failing.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"#series connection\n",
"n = 3;# no. of identical lamp\n",
"Vt = 150;# in volts\n",
"\n",
"#calculation:\n",
"V = Vt/3# Since each lamp is identical, then V volts across each.\n",
"\n",
"print \"\\n\\nResult\\n\\n\"\n",
"print \"\\n a)Voltage across each resistor = \",V,\" Volts(V)\\n\"\n",
"print \"\\n b)If lamp C fails, i.e., open circuits, no current will flow and lamps A and B will not operate.\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Result\n",
"\n",
"\n",
"\n",
" a)Voltage across each resistor = 50.0 Volts(V)\n",
"\n",
"\n",
" b)If lamp C fails, i.e., open circuits, no current will flow and lamps A and B will not operate."
]
}
],
"prompt_number": 21
}
],
"metadata": {}
}
]
}