# Solve for branch currents I1 and I2.
R1 = 1.*10**3# # Resistor 1=1*10**3 Ohms
R2 = 600.# # Resistor 2=600 Ohms
Va = 15.# # Applied Voltage=15 Volts
I1 = Va/R1#
print 'The Current Resistor R1 = %0.3f Amps'%I1
print 'i.e 15 mAmps'
I2 = Va/R2#
print 'The Current Resistor R2 = %0.2f Amps'%I2
print 'i.e 25 mAmps'
# An R1 of 20 Ohms, an R2 of 40 Ohms, and an R3 of 60 Ohms are connected in parallel across the 120-V power line. Using Kirchhoff’s current law, determine the total current It.
# Given data
R1 = 20.# # Resistor 1=20 Ohms
R2 = 40.# # Resistor 2=40 Ohms
R3 = 60.# # Resistor 3=60 Ohms
Va = 120.# # Applied Voltage=120 Volts
I1 = Va/R1#
I2 = Va/R2#
I3 = Va/R3#
It = I1+I2+I3
print 'The Total Current in the Mainline = %0.f Amps'%It
# Two branches R1 and R2 across the 120-V power line draw a total line current It of 15 A. The R1 branch takes 10 A. How much is the current I2 in the R2 branch?
# Given data
I1 = 10# # Current in R1 branch=10 Amps
It = 15# # Total Current=15 Amps
I2 = It-I1#
print 'The Current in R2 branch = %0.f Amps'%I2
# Three parallel branch currents are 0.1 A, 500 mA, and 800 A. Using Kirchhoff’s current law, calculate It.
# Given data
I1 = 0.1# # Branch Current 1=0.1 Amps
I2 = 0.5# # Branch Current 2=500m Amps
I3 = 800*10**-6# # Branch Current 3=800u Amps
It = I1+I2+I3#
print 'The Total Current = %0.4f Amps'%It
print 'i.e 600.8 mAmps'
# Two branches, each with a 5-A current, are connected across a 90-V source. How much is the equivalent resistance Req?
# Given data
I1 = 5# # Branch Current 1=5 Amps
I2 = 5# # Branch Current 2=5 Amps
Va = 90# # Applied Voltage=90 Volts
It = I1+I2#
Req = Va/It#
print 'The Equivalent Resistance Req = %0.f Ohms'%Req
# What Rx in parallel with 40 Ohms will provide an Req of 24 Ohms?
# Given data
R = 40.0# # Resistance=40 Ohms
Req = 24.0# # Equivqlent Resistance=24 Ohms
Rx = (R*Req)/(R-Req)#
print 'The Value of Rx = %0.2f Ohms'%Rx
# What R in parallel with 50 kOhms will provide an Req of 25 kOhms
# Given data
R1 = 50*10**3# # R1=50k Ohms
Req = 25*10**3# # Req=25k Ohms
R = (R1*Req)/(R1-Req)#
print 'The value of R = %0.f Ohms'%R
print 'i.e 50 kohms'