stress=333.
G=79500
a=float(input(print("enter the value of static load:")))
b=float(input(print("enter the value of peak load")))
c=float(input(print("enter the value of spring index")))
s=float(input(print("enter the value of deflection")))
ks=((4*c-1)/(4*c-4))+(0.615/c)
W=(a+b)/2
d=((8*W*c*ks)/(3.14*stress))**(1/2)
D=c*d
n=(G*s*d)/(8*W*c*c*c)
n1=n+2
stiffness=(G*d)/(8*n*c*c*c)
ls=n1*d
lf=ls+s+0.15*s
p=lf/(n1-1)
print("spring index=",c)
print("mean diameter=",D)
print("diameter of wire=",d)
print("stiffness=",stiffness)
print("deflection=",s)
print("no of active coil=",n)
print("total no. of coils=",n1)
print("solid length=",ls)
print("free length=",lf)
print("pitch=",p)