#Initialization
i=5 #current in ampere
l=0.628 #circumference
#Calculation
h=i/l #magnetic field strength
#Results
print'Magnetic Field Strength, H = %.2f A/m'%h
import math
#Initialization
i=6 #current in ampere
n=500 #turns
l=0.4 #circumference
uo=4*math.pi*10**-7 #epsilon zero constant
a=300*10**-6 #area
#Calculation
f=n*i #Magnetomotive Force
h=f/l #magnetic field strength
b=uo*h #magnetic induction
phi=b*a #flux
#Results
print'(a) Magnetomotive Force, H = %.2f ampere-turns'%f
print'(b) Magnetic Field Strength, H = %.2f A/m'%h
print'(c) B = %.2f mT'%(b*10**3)
print'(d) Toal Flux, phi = %.2f uWb'%(phi*10**6)
#Initialization
l=10*10**-3 #inductance in henry
di=3
#Calculation
v=l*di #voltage
#Results
print'Voltage, V = %d mV'%(v*10**3)
import math
#Initialization
n=400 #turns
l=200*10**-3 #circumference
uo=4*math.pi*10**-7 #epsilon zero constant
a=30*10**-6 #area
#Calculation
L=(uo*a*n**2)/l #Inductance in henry
#Results
print'Inductance,L = %d uH'%(L*10**6)
import math
#Initialization
l1=10 #Inductance in henry
l2=20 #Inductance in henry
#Calculation
ls=l1+l2 #Inductance in henry
lp=((l1*l2)*(l1+l2)**-1) #Inductance in henry
#Results
print'(a) Inductance in series,L = %d uH'%ls
print'(b) Inductance in parallel,L = %.2f uH'%lp
import math
#Initialization
l=10**-2 #Inductance in henry
i=5 #current in ampere
#Calculation
s=0.5*l*i**2 #stored energy
#Results
print'Stored Energy = %d mJ'%(s*10**3)