import math
#initialisation of variables
Sb=100.0 # base value of power(MVA)
Vb=33.0 # base value of voltage (Kv)
#Calculations
Vbl=Vb*110.0/32
Vbm=Vbl*32.0/110
Zp_ut=0.08*100*32*32/(110*33*33)
Zp_u_l=50*100/(Vbl**2)
Zp_um1=0.2*100*30*30.0/(30*33*33)
Zp_um2=0.2*100*30*30.0/(20*33*33)
Zp_um3=0.2*100*30*30.0/(50*33*33)
#Results
print("Base value of voltage in line = %.2f kV" %Vbl)
print("Base value of voltage in motor circuit=%.0f kV" %Vbm)
print("p.u value of reactance transformer =%.5f p.u" %Zp_ut)
print("p.u value of impedence of line=%.4f p.u" %Zp_u_l)
print("p.u value of reactance of motor 1 =%.4f p.u" %Zp_um1)
print("p.u value of reactance of motor 2 =%.3f p.u" %Zp_um2)
print("p.u value of reactance of motor 3 =%.4f p.u" %Zp_um3)