#Given
RL=16 # Ohms, load resistance
RLd=10000.0 # Ohms ,effective load resistance
#Calculation
import math
N12=math.sqrt(RLd/RL) #N12=N1/N2
# Result
print " The Transformer Turns Ratio is N1/N2",N12,":1"
#Given Circuit Data
Rl=8.0 #Ohms, load resistance
N12=15.0 #N12=N1/N2, transformer turns ratio
#Calculation
Rld=(N12)**2*Rl #effective resistance
# Result
print " The Effective Resistance seen looking into the Primary, Rld = ",Rld/10**3,"k ohm"
I1=15 #A
I2=1.5 #A
I3=1.2 #A
I4=0.5 #A
#Calculation
D2=(I2/I1)*100 #percentage harmonic distribution of component 2
D3=(I3/I1)*100 #percentage harmonic distribution of component 3
D4=(I4/I1)*100 #percentage harmonic distribution of component 4
#Result
print " The Second Harmonic Distortion is, D2 = percent .",D2
print " The Third Harmonic Distortion is, D3 = percent .",D3
print " The Fourth Harmonic Distortion is, D4 = percent .",round(D4,2)
#(b)
import math
P1=1 #say
#Calculation
D=math.sqrt(D2**2+D3**2+D4**2) #Distortion Factor
P=(1+(D/100)**2)*P1
Pi=((P-P1)/P1)*100
#Result
print "The Percentage Increase in Power because of Distortion is, Pi (in percent)= ",round(Pi,2)