I'm very much a
def func(arg1, arg2, arg3)
for x in range(0, arg2 / 2)
TypeError: 'float' object cannot be interpreted as an integer
for x in range(0, int(arg2)/2)
arg2 / 2 you will get a float. If you want an int try
args // 2
2 / 2 = 1.0 but
2 // 2 = 1
But you will lose accuracy doing this, but since you want an int I'm assuming you want to round up or down anyways.
This is for Python 3.x
In python 2.x / is an int division by default; to get a float division, you had to make sure one of the number was a float.