I have to make a program using Euler\'s method for the \"ball in a spring\" model
from pylab import* from math import* m=0.1 Lo=1 tt=30 k=200 t=20 g=9.81 dt=0.01
You are dividing by rr which may be 0.0. Check if rr is zero and do something reasonable other than using it in the denominator.
rr