In [1]:

```
#Variables
IS = 4.0 #Current (in Ampere)
Rin = 25.0 #Resistance (in ohm)
#Calculation
Voc = IS * Rin #Voltage (in volts)
#Result
print "Equivalent voltage source is ",Voc," V."
```

In [2]:

```
#Variables
R1 = 4.0 #Resistance (in ohm)
R2 = 8.0 #Resistance (in ohm)
RS = 28.0 #Resistance (in ohm)
V1 = 40.0 #Voltage (in volts)
V2 = 40.0 #Voltage (in volts)
#Calculation
Rnet = R1 + R2 + RS #Net resistance (in ohm)
Vnet = V1 + V2 #Net voltage (in volts)
I = Vnet / Rnet #Current (in Ampere)
#Result
print "Current in 28 ohm resistor is ",I," A."
```