I have this one line that my script is getting caught up on:
for d in range(len(r)/2)
I am not sure what value is what value it thinks in a float. I try casting the length of r/2 as an int but still I get this error. I am really new to Python and really lost.
In Python 3.x, the
/division operator always gives a float value. To use integer division, use//:I suspect you tried
range(int(len(r))/2)but that doesn’t change how the division works.