I have to evaluate a function (3x-2) in a interval [-10,10] with precision increments from 1, 0.1, 0.01, 0.001, 0.0001, etc. I tried this
a=1.0
for x in range(1,40):
for y in range(-10,10,a):
c=3(x)-2
print(c)
a=a/10
(The first for is because I need to get 40 decimals) But I got this error
for x in range(-10,10,a):
TypeError: 'float' object cannot be interpreted as an integer
Thanks for the help.