#given
R=(6,6.0,12) #Resistances from circuit diagram 12.34 on page no.192 in ohms
V=(5,2) #Voltage in V from circuit diagram 12.20 on page no.192
#Calculations
Re=(R[2]*R[1])/(R[2]+R[1])
Re2=Re+R[1]
I=V[0]/Re2
Ve=I*Re
I1=Ve/R[2]
RE=(R[0]*R[1])/(R[0]+R[1])
RE2=RE+R[2]
I2=Ve/RE2
Itotal=I1-I2
#Output
print"The current is ",round(Itotal,2),"A"
#given
R=(3,5,6,7) #Resistances from circuit diagram 12.36(a) on page no. 193 in ohms
V=12 #Voltage in V from circuit diagram 12.36(a) on page no. 193
#Calculations
Vth=(V*R[2])/(R[2]+R[3]+R[1])
Rth=R[0]+(V*R[2])/(V+R[2])
#Output
print"Thevenin equivalent resistance is ",Rth,"ohms"
print"Thevenin equivalent voltage is ",Vth,"V"
#given
R=(2,3,4.0) #Resistances from circuit diagram 12.37(a) on page no.194 in ohms
V=5 #Voltage in V from circuit diagram 12.37(a) on page no.194
#Calculations
RN=(V*R[2])/(V+R[2])
IN=V/(R[0]+R[1])
#Output
print"Nortons equivalent resistance is ",round(RN,1),"ohms"
print"Nortons equivalent current is ",IN,"A"
#given
C=10*10**-6 #Capicitance in F
R=10.0*10.0**3 #Resistance in ohms
e=6 #Emf of the battery in V
#Calculations
t=C*R
Qm=(C*e)/10.0**-6
Im=(e/R)*1000
#Output
print"Time constant of the circuit is ",t,"s"
print"Maximum charge on the capacitor is ",Qm,"micro C"
print"Maximum current in the circuit is ",Im,"mA"
print"Charge at time t is Q(t) = ",Qm,"micro C"
print"Currrent at time t is I(t) = ",Im,"mA"
#given
L=50 #Inductance in mH
R=5.0 #Resistance in ohms
V=6 #Volatage of the battery in V
t=5 #Time in ms
#Calculations
import math
t1=(L/R)
I=(V/R)*(1-math.exp(-t/t1))
#Output
print"The time constant of the circuit is ",t1,"ms"
print"The current in the circuit is ",round(I,2),"A"
#given
L=6 #Inductance in mH
C=12 #Capacitance in pF
V=6 #Voltage of the battery in V
#Calculations
import math
f=(1/(2.0*3.14*math.sqrt(L*10**-3*C*10**-12)))/10**5
Qm=(C*10**-12*V)/10.0**-12
Im=(2*3.14*f*10**5*Qm*10**-12)/10.0**-6
#Output
print"Frequency of oscillation is ",round(f,2),"*10^5 Hz"
print"The maximum value of charge on capacitor is ",Qm,"*10**-12 C"
print"The current in the circuit is ",round(Im,0),"micro A"
#given
V=10 #voltage in V from fig.12.7 on page no.175
R=10.0 #Resistance in ohms from fig.12.7 on page no.175
#Calculations
I=(V/R)
#Output
print"Current in the circuit shown in fig.12.7 is ",I,"A"
#given
R=(6,6,3.0) #Resistances in the circuit from circuit diagram 12.9 on page no. 175 in ohms
V=(24,16) #Voltages in the circuit from circuit diagram 12.9 on page no. 175 in V
#Calculations
Re=(R[1]*R[2])/(R[1]+R[2])
Re1=Re+R[0]
I=V[0]/Re1
Ve=I*Re
Ie=Ve/R[2]
RE=(R[0]*R[1])/(R[0]+R[1])
RE1=RE+R[2]
I1=V[1]/RE1
VE=R[2]*I1
I2=VE/R[0]
Itotal=Ie+I2
#Output
print"The current shown in the circiut is ",round(Itotal,1),"A"
#given
R=(4,12,2.0,12) #Resistances from circuit diagram 12.12 on page no. 177 in ohms
V=12 #Voltage in V from circuit diagram 12.12 on page no. 177
#Calculations
Rth=((R[0]+R[2])*R[1])/(R[0]+R[2]+R[1])
Vth=(V*R[1])/(R[0]+R[2]+R[1])
I=(Vth/(Rth+R[3]))
#Output
print"The current through the resistor is ",I,"A"
#given
R=(2,3,6) #Resistances from circuit diagram 12.15 on page no. 178 in ohms
I=2 #Current in A from circuit diagram 12.15 on page no. 178
#Calculations
Rth=(R[1]+R[2])
Vth=(R[2]*I)
#Output
print"Thevenin equivalent resistance is ",Rth,"ohms"
print"Thevenin equivalent voltage is ",Vth,"V"
#given
R=(12,8.0,3.0,6) #Resistances from circuit diagram 12.17 on page no.179 in ohms
V=12 #Voltage in V from circuit diagram 12.17 on page no.179
#Calculations
Rth=((R[2]*R[0])/(R[2]+R[0]))+((R[1]*R[3])/(R[1]+R[3]))
Vth=V*((R[1]*R[3])/(R[1]+R[3]))/(R[0]+R[2])
#Output
print"Thevenin equivalent resistance is ",round(Rth,2),"ohms"
print"Thevenin equivalent voltage is ",round(Vth,2),"V"
#given
R=(4,12,2,12) #Resistances from circuit diagram 12.20 on page no.180 in ohms
V=12 #Voltage in V from circuit diagram 12.20 on page no.180
#Calculations
RN=((R[0]+R[2])*R[1])/(R[0]+R[2]+R[1])
IN=V/(RN+R[2])
#Output
print"Nortons equivalent resistance is ",RN,"ohms"
print"Nortons equivalent current is ",IN,"A"
#given
R=(4.0,5,6) #Resistances from circuit diagram 12.22 on page no.181 in ohms
I=2 #Current in A from circuit diagram 12.22 on page no.181
#Calculations
RN=(R[0]+R[1]+R[2])
IN=(R[0]*I)/RN
#Output
print"Nortons equivalent resistance is ",RN,"ohms"
print"Nortons equivalent current is ",round(IN,2),"A"