import math
#Variable Declaration
phi=500*10**-8 #in weber
A=(1*1)*(2.54*10**-2)**2 #in meter square
#Calculation
B=phi/A #in tesla
#Results
print "Total Magenetic Flux =",phi*10**6,"micro weber"
print "Cross Section=",'%.2e' % A,"meter square"
print "Flux Density(B)=",round(B*10**3,2),"mT"
import math
#Variable Declaration
F=98.6 #Temperature =98.6 Farenheit
#Calculations
Celsius_temperature=(F-32)/1.8 #in Celsius
Kelvin_temperature=(F-32)/1.8+273.15 #in Kelvin
#Results
print "Celsius Temperature=",Celsius_temperature,"degree celsisus"
print "Kelvin Temperature=",round(Kelvin_temperature,2),"K"
import numpy as np
# Powers of M, L,T,I are expressed in an array consisting of four elements
#Each array element represents the power of the corresponding dimension
#it is of the form [M,L,T,I]
P=np.array([1,2,-3,0]) #Dimesnion of Power
I=np.array([0,0,0,1]) #Dimension of Current
E=P-I #As E=P/I, the powers have to be subtracted
R=E-I #As R=E/I, the powers have to be subtracted
print "The dimensions of Voltage and Resistance are expressed in array format[M L T I],"
print "Voltage=",E
print "Resistance=",R