ZL=220/2
print "Load impedance=%.1f ohm"%(ZL)
Z_total=220/4
print "Impedance of the combination=%.2f ohm"%(Z_total)
I1=2
I2=2.5
I3=4
P=(Z_total/2)*(I3**2-I1**2-I2**2)
print "Power absorbed by load=%.2f W"%(P)
pf=P/(220*2**2)
print "power factor of load=%.2f"%(pf)
from __future__ import division
I=125/10
ZL=50/I
print "Load impedance = %.1f ohm"%(ZL)
Z_total=150/I
print "Impedance of the combination = %.2f ohm"%(Z_total)
I1=125
I2=50
I3=150
P=(1/(2*10))*(I3**2-I1**2-I2**2)
print "Power absorbed by load = %.2f W"%(P)
Pr=I**2*10
print "Power consumed by the resistor = %.2f W"%(Pr)
pf=P/(50*I)
print "power factor of load = %.2f"%(pf)