In [2]:

```
from __future__ import division
import math
#given data:
V = 230; # in volts
I = 10; # in A
# calculations:
R = V/I;
#Results
print "resistance of element,R =", R,"ohm"
```

In [1]:

```
from __future__ import division
import math
#given data :
R1 = 0.5; # minimum value of resistance in ohm
R2 = 20; # maximum value of resistance in ohm
I = 1.2; # current in A
#Calculation
V1 = I*R1;
V2 = I*R2;
#Results
print "Voltage drop in Ist case,V1(V)=",V1,"volts and voltage drop in IInd case,V2(V)=", V2,"volts"
```

In [3]:

```
from __future__ import division
import math
#given data :
L = 1000; # length of wire in cm
d = 0.14; # diameter of wire in cm
R1 = 2.5*10**6;# resistance in micro-ohm
# calculations:
a = (math.pi*d**2)/4; # cross section area
p = (R1*a)/L;
#Results
print "the specific resistance,p =", round(p,1)," uOhm-cm"
```

In [4]:

```
from __future__ import division
import math
#given data :
Rt1 = 54.3;# resistance in ohm
alfa = 0.0043;# the resistance temperature of coeficient in per degree celcius
t1 = 20;# temperature in degree celcius
t2 = 40;# temperature in degree celcius
# calculations
Rt2 = (Rt1*(1+(alfa*t2)))/(1+(alfa*t1));
#Results
print "resistance at 40 degC ,Rt2=", Rt2," ohms"
```

In [4]:

```
from __future__ import division
import math
#given data :
r1=30;# resistance in ohm
r2=35;# resistance in ohm
r3=45;# resistance in ohm
V=220;
# calculations:
R=r1+r2+r3;
I=V/R;
#Results
print "(a)total resistance,R=", R," ohm"
print "(b)current,I=", I,"A"
```

In [6]:

```
from __future__ import division
import math
#given data :
I=75;# current in A
R=0.15;# resistance in ohm
v=220;# voltage in volts
#calculations
V1=I*R;# voltage drop of the feeder in section AB
V2=I*R;# voltage drop of the feeder in section CD
V_total=V1+V2;# total voltage drop in the lead and return feeder
V=v+V_total;
#Results
print "voltage at the generating station,V=", V,"volts"
```

In [7]:

```
from __future__ import division
import math
#given data :
r1=6;# resistance in ohm
r2=10;# resistance in ohm
r3=15;# resistance in ohm
#calculations:
r=(1/r1)+(1/r2)+(1/r3);
R=1/r;
#Results
print "equivalent resistance,R=", R,"ohm"
```

In [8]:

```
from __future__ import division
import math
#given data :
I=5; # current in A
n=2; # number of resistance in parallel of section BC
r1=15;# resistance in ohm
r2=20;# resistance in ohm
r3=60;# resistance in ohm
r4=64;# resistance in ohm
r5=64;# resistance in ohm
r6=2.5;# resistance in ohm
#calculation
R1=r4/n;# equivalent resistance of section BC
R2=(r1*r2*r3)/((r1*r2)+(r2*r3)+(r3*r1));# equivalent resistance of section CD
R=R1+R2+r6;# equivalent resistance of section AD
V=I*R;
#Results
print "voltage,V= ", V,"volts"
```

In [9]:

```
from __future__ import division
import math
#given data :
V=240;# voltage in volts
r1=2;# resistance in ohm
r2=3;# resistance in ohm
r3=8.8;# resistance in ohm
r4=10;# resistance in ohm
r5=3;# resistance in ohm
# calculations:
R1=(r1*r2)/(r1+r2);# equivalent resistance of parallel branch
R2=R1+r3;# equivalent resistance of section ABC
R3=(R2*r4)/(R2+r4);
R=R3+r5;# total resistance of section AD
I=V/R;
V1=I*r5;# voltage drop across r5
V2=V-V1;# voltage drop across section ABC
I1=V2/r4;# current flowing through r4 resistance
I2=I-I1;# current in r3 resistance
V3=I2*r3;# voltage drop across r3 resistance, section ABC
V4=V2-V3;# voltage drop between section AB
I3=V4/r1;# current flowing through r1 resistance
I4=V4/r2;# current flowing through r2 resistance
#Results
print "current flowing through r1 (2 ohms) resistance,I3 =", I3," A"
print "current flowing through r2 (3 ohms)resistance,I4 =", I4," A"
print "total resistance,R = ", R," ohm"
print "voltage drop across r5(3 ohms) resistance,V1 =", V1," volts"
print "voltage drop across section ABC,V2 = ", V2," volts"
print "voltage drop across r3 resistance(8.8 ohms),V3 = ",V3," Volts"
print " voltage drop between section AB,V4 = ", V4,"volts"
```

In [10]:

```
from __future__ import division
import math
#given data :
I=44;# current in A
r1=6;# resistance in ohm
r2=12;# resistance in ohm
r3=18;# resistance in ohmr1
# calculation:
a=(1/r1)+(1/r2)+(1/r3);
R=1/a;
V=I*R;
i1=V/r1;
i2=V/r2;
i3=V/r3;
#Results
print "current in 6 ohm resistance,i1 = ",i1,"A"
print "current in 12 ohm resistance,i2 = ",i2,"A"
print "current in 18 ohm resistance,i3 = ",i3,"A"
```

In [7]:

```
from __future__ import division
import math
#given:
t=15 #TOTAL CURRENT IN AMPERES
i1=2 #CURRENT THROUGH UNKNOWN RESISTANCE
R1=15#in ohms
R2=50/2#in ohms
# calculations:
x=(t-i1)*((R1*R2)/(R1+2*R2))#unknown resistance in ohms)
PD=i1*x#in volts
RX=((1/R1)+(1/(2*R2))+(1/x))#
R=1/RX
i5= PD/(2*R2)#current in 5 ohms resistance
i15=PD/R1#current in 15 ohms resistance
#Results
print "(a)unknown resistance in ohms =", x
print "(b)potential drop across the circuit in volts is =", PD
print "(c)current in 5 ohms resistance in ampere =",i5,"\n and current in 15 ohms resistance in ampere =", i15
print "(d)total resistance of the circuit in ohms =",R
```