import math
from __future__ import division
#initialisation of variables
K=2*10**-7; #constant in N/A square
I=100; #current in Ampere
s=5; #distance in m
#CALCULATIONS
B=(K*I)/s; #calculating magnitude of field
#RESULTS
print"Magnitude of field in Tesla =",round(B,7);
import math
from __future__ import division
#initialisation of variables
K=2*10**-7; #constant in N/A square
I=8; #current in Ampere
s=5*10**-2; #distance in m
#CALCULATIONS
B=(K*I)/s; #calculating magnitude of field
B1=2*B;
#RESULTS
print"Magnitude of field in Tesla =",round(B,7);
print"Total field in Tesla =",round(B1,7);
import math
from __future__ import division
#initialisation of variables
K=2*10**-7; #constant in N/A square
N=100; #number of turns
I=4; #current in Ampere
r=5*10**-2; #radius in m
#CALCULATIONS
B=(3.14*K*I*N)/s; #calculating magnitude of field
#RESULTS
print"Magnitude of field in Tesla =",round(B,5);
import math
from __future__ import division
#initialisation of variables
K=2*10**-7; #constant in N/A square
N=1000; #number of turns
B=2.5*10**-5; #field in Tesla
l=0.2; #length in m
#CALCULATIONS
I=(B*l)/(2*3.14*K*N); #calculating magnitude of field
#RESULTS
print"Current in Ampere =",round(I,5);
import math
from __future__ import division
#initialisation of variables
I=5; #current in Ampere
L=0.01; #length in m
B=0.8; #magnitude of field in Tesla
#CALCULATIONS
F=B*I*L; #calculating force
#RESULTS
print"Force in Newton =",round(F,3);
import math
from __future__ import division
#initialisation of variables
P=2000; #power in Watt
V=120; #potential diff in volt
I=P/V; #current in Ampere
s=2*10**-3; #distance in m
K=2*10**-7; #constant in N/A square
#CALCULATIONS
F=(I*I*K)/s; #calculating force per metre
#RESULTS
print"Force in Newton per metre in opposite direction =",round(F,5);