do a range from -0.1 to 0.1 with a 0.01 path in python

You can use a for loop with range() function to achieve a range from -0.1 to 0.1 at a path of 0.01. Here's the code:

main.py
for i in range(-10, 11):
  num = i/100.0
  print(num)
54 chars
4 lines

In this code, we use the range() function with the start value of -10 and the end value of 11 (exclusive). The loop variable i takes values from -10 to 10.

We then divide i by 100.0 to get a float value between -0.1 and 0.1 in increments of 0.01. This float value is stored in the variable num.

Finally, we print num to display the value for each iteration of the loop.

gistlibby LogSnag