K=4
strain=1*10**-6
R=150
dR=K*strain*R*10**6
print "Change in resistance = %.1f micro-ohm"%(dR)
from math import pi
d=0.03
a=pi*d**2/4
f=40000
l=0.5
E=3*10**10
dl=f*l/(E*a)
print "Change in length = %.6f m"%(dl)
d=10**-4
A=6*10**-3
permitivity_absolute=8.854*10**-12
permitivity_relative=1
C=permitivity_absolute*permitivity_relative*A*10**12/d
print "capacitance = %.2f pF"%(C)
print '1.5 cm core displacement produces 6V so'
d_15=6
d_18=1.8*d_15/1.5
print "1.8 cm core displacement produces = %.2f V"%(d_18)
d_08=(-0.8)*(-d_15)/(-1.5)
print "-0.8 cm core displacement produces = %.2f V"%(d_08)
d_06=(-0.6)*(-d_15)/(-1.5)
print "-0.6 cm core displacement produces = %.2f V"%(d_06)
k=4*10**3
dx=0.04
m=0.1
acc=k*dx/m
accg=acc/9.8
print "acceleration=%.2f g"%(accg)
fn=(1/2*pi)*(k/m)**0.5
print "Natural Frequency = %.2f Hz"%(fn)