Chapter 17:DC Circuits

Ex17.1:pg-866

In [2]:
import math # Example17_1
 
  
#To find number of electrons flow through bulb
current=0.15       #Units in C
q=1.6*10**-19          #Units in C/electron
noe=current/q       #Units in number of Electrons
print "The number of electrons that pass through bulb is="
print noe
print "electrons"
The number of electrons that pass through bulb is=
9.375e+17
electrons

Ex17.2:pg-867

In [3]:
import math # Example17_2
 
  
#To find the resistance in bulb
v=1.55    #Units in V
i=0.08        #Units in A
r=v/i   #Units in Ohms
print "The resistance in bulb is=",round(r,1)," Ohms"
The resistance in bulb is= 19.4  Ohms

Ex17.3:pg-867

In [4]:
import math # Example17_3
 
  
#To find the resistance in wire
row=1.7*10**-8     #Units in Ohm meter
l=40    #Units in meters
a=0.0331*10**-4      #Units in meters**2
r=(row*l)/a       #Units in Ohms
print "The resistance in wire is=",round(r,3)," Ohms"
The resistance in wire is= 0.205  Ohms

Ex17.4:pg-868

In [5]:
import math # Example17_4
 
  
#To find the appropriate resistance of the wire
alpha=0.0045       #Units in Centigrade**-1
t=1780         #Units in Centigrade
deltaR=240    #Units in Ohms
ro=deltaR/(1+(alpha*t))    #Units in ohms
print "The appropriate resistance in wire is Ro=",round(ro,1)," Ohms"
The appropriate resistance in wire is Ro= 26.6  Ohms

Ex17.5:pg-868

In [6]:
import math # Example17_5
 
  
#To find out the amount of heat developed in bulb
t=20.0*60     #Units in sec
pow=40.0  #Units in W
heat=t*pow   #Units in J
print "Heat generated in bulb is=",round(heat)," J"
Heat generated in bulb is= 48000.0  J

Ex17.6:pg-869

In [7]:
import math # Example17_6
 
  
#To calculate the cost needed to operate
power=0.7    #Units in KW
time=0.5      #Units in h
heat=power*time #Units in K Wh
cost=0.10      #Units in Dollars
tcost=cost*heat     #Units in Dollars
print "Cost needed to operate is=",round(tcost,4)," Dollars"
Cost needed to operate is= 0.035  Dollars

Ex17.7:pg-869

In [8]:
import math # Example17_7
 
  
#To find the current in circuit
v1=3    #Units in V
v2=12.0#Units in V
r1=5.0   #Units in Ohms
r2=6 #Units in Ohms
i=(v1-v2)/(r1+r2)     #Units in A
print "The current in circuit is I=",round(i,2)," A"
The current in circuit is I= -0.82  A

Ex17.8:pg-870

In [9]:
import math # Example17_8
 
  
#To find the current in all wires
v=9 #Units in V
r1=18.0   #Units in Ohms
i2=-v/r1     #Units in A
v1=6.0    #Units in V
r2=12.0     #Units in Ohms
i3=(v+v1)/r2          #Units in A
i1=i3-i2     #Units in A
print "Current in wire 1 is I1=",round(i1,2)," A\nCurrent in wire 2 is I2=",round(i2,2)," A\nCurrent in wire 3 is I3=",round(i3,2)," A\n"
Current in wire 1 is I1= 1.75  A
Current in wire 2 is I2= -0.5  A
Current in wire 3 is I3= 1.25  A

Ex17.9:pg-871

In [12]:
import math # Example17_9
 
  
#To find the current I in the battery
r1=3 #Units in Ohms
r2=6.0   #Units in Ohms
rbc=(r1*r2)/(r1+r2)#Units in Ohms
r3=4#Units in Ohms
rac=r3+rbc        #Units in Ohms
v=12.0    #Units in V
i=v/rac        #Units in A
print "The current I=",round(i)," A"
The current I= 2.0  A

Ex17.10:pg-872

In [15]:
import math # Example17_10
 
  
#To find the current in battery
r1=3.0 #Units in Ohms
r2=6.0   #Units in Ohms
ra=(r1*r2)/(r1+r2)#Units in Ohms
r3=2        #Units in Ohms
r4=4.0    #Units in Ohms
rb=r3+r4       #Units in Ohms
r5=6.0          #Units in Ohms
rc=(r5*rb)/(r5+rb)   #Units in Ohms
r6=9.0           #Units in Ohms
r=r6+rc          #Units in Ohms
v=6              #Units in V
i=v/r               #Units in Ohms
print "The current in battery is I=",round(i,2)," A"
The current in battery is I= 0.5  A

Ex17.11:pg-872

In [16]:
import math # Example17_11
 
  
#To find the current in the wires
v1=12.0          #Units in V
r3=20.0       #Units in Ohms
v2=6        #Units in V
r2=10.0     #Units in Ohms
r1=5    #Units in Ohms
i3=((v1*r3)-(v2*r1))/((r2*r3)+(r1*r3)+(r1*r2))        #Units in A
i2=((r2*i3)+v2)/r3           #Units in A
i1=i3+i2        #Units in A
print "Current in wire 1 is I1=",round(i1,1)," A\nCurrent in wire 2 is I2=",round(i2,1)," A\nCurrent in wire 3 is I3=",round(i3,1)," A\n"
Current in wire 1 is I1= 1.2  A
Current in wire 2 is I2= 0.6  A
Current in wire 3 is I3= 0.6  A

Ex17.12:pg-873

In [17]:
import math # Example17_12
 
  
#To find I1, I2 and I3 in the circuit
v1=40      #Units in V
r1=10.0         #Units in Ohms
r2=30.0         #Units in Ohms
v2=60.0   #Units in V
r3=15.0      #Units in Ohms
v3=50      #Units in V
i1=((-v1*r2)+(-r3*v1)+(60*r3)+(v3*r2))/((r1*r2)+(r2*r3)+(r3*r1))    #Units in A
i=2         #Units in A
i2=(i-i1)/3        #Units in A
i3=i2-i1        #Units in A
print "Current in wire 1 is I1=",round(i1,3)," A\nCurrent in wire 2 is I2=",round(i2,3)," A\nCurrent in wire 3 is I3=",round(i3,3)," A\n"
Current in wire 1 is I1= 0.667  A
Current in wire 2 is I2= 0.444  A
Current in wire 3 is I3= -0.222  A

Ex17.13:pg-874

In [18]:
import math # Example17_13
 
  
#To find the values of e, R and I
i1=2      #Units in A
i2=0.5        #Units in A
i=i1+i2    #Units in A
v1=6 #Units in V
v2=16.0       #Units in V
r=-(v1-v2)/0.5      #Units in Ohms
v3=25.0    #Units in V
e=v2+v3         #Units in V
print " The current I=",round(i,1)," A\n Resistance is R=",round(r)," Ohms\n The value E is=",round(e)," V"
 The current I= 2.5  A
 Resistance is R= 20.0  Ohms
 The value E is= 41.0  V

Ex17.14:pg-874

In [19]:
import math # Example17_14
 
  
#To find the I1,I2,I3 values and charge on the capacitor
v1=12.0     #Units in V
r1=6.0     #Units in Ohms
i1=v1/r1     #Units in A
v2=4.0       #Units in V
r2=8.0      #Units in Ohms
i3=(v1+v2)/r2        #Units in A
i2=i1+i3         #Units in A
print "Current in wire 1 is I1=",round(i1)," A\nCurrent in wire 2 is I2=",round(i2)," A\nCurrent in wire 3 is I3=",round(i3)," A\n"
v3=10.0               #Units in V
vfg=-v3+(r1*i1)         #Units in V
c=5*10**-6               #Units in F
q=c*vfg                 #Units in C
print "The charge on the capacitor is q=",round(q,5)," C"   
Current in wire 1 is I1= 2.0  A
Current in wire 2 is I2= 4.0  A
Current in wire 3 is I3= 2.0  A

The charge on the capacitor is q= 1e-05  C

Ex17.15:pg-874

In [20]:
import math # Example17_15
 
  
#To find the terminal potential of each battery
v=18        #Units in V
r=9          #Units in Ohms
i=v/r      #Units in A
r1=0.1    #Units in Ohms
v1=-i*r1     #Units in V
v2=24      #Units in V
v11=v1+v2       #Units in V
r2=0.9      #Units in Ohms
v3=i*r2    #Units in V
v4=6        #Units in V
v22=v3+v4     #Units in V   
print "The Potential difference between d to c is=",round(v11,1)," V"
print "\nThe potential difference between b to a is=",round(v22,1)," V"
The Potential difference between d to c is= 23.8  V

The potential difference between b to a is= 7.8  V

Ex17.16:pg-875

In [21]:
import math # Example17_16
 
  
#To findout how large a a resistance must the recording device must have
r1=10000.0        #Units in Ohms
percent=1.0          #Units in Percentage 
vo=1/(r1*(percent*100))      #Units In terms of Ro
Ro=1/vo        #Units in Ohms
print "The resistance of the recording device is=",round(Ro)," Ohms"
The resistance of the recording device is= 1000000.0  Ohms