How to make it like that so odd indexes will be doing (-) and even indexes will do (+) The max iteration is 6. iteration 1 +10, iteration 2 -20, iteration 3 +30, iteration 4 -40, iteration 5 + 50, iteration 6 -60
AA = np.array([[9.27914]+10,
              [9.33246]-20,
              [9.26303]+30,
              [9.30597]-40,
              [9.6594 ]+50,
              [9.04283]-60,
              [8.88866]+10,
              [8.89956]-20])

expected results:
AA=np.array([
    [19.27914],
    [-10.66754],
    [39.26303],
    [-30.69403],
    [59.6594],
    [-50.95717],
    [18.88866],
    [-11.10044],
])

I try use this code but not working
max_iter = 6
iter = 0
for i in range(len(AA)):
    if i % 2 == 0:
        AA[i][0] = AA[i][0] + (iter % max_iter)
    else:
       AA[i][0] = AA[i][0] - (iter % max_iter)
    iter += 10


How to doing dynamic calculation in python
You were very close. Just had to make 3 small changes. I added a +1 inside the parenthesis, added *10 for each of the array operations and change iter += 10 to array += 1
max_iter = 6
iter = 0
for i in range(len(AA)):
    if i % 2 == 0:
        AA[i][0] = AA[i][0] + (iter % max_iter+1)*10
    else:
        AA[i][0] = AA[i][0] - (iter % max_iter+1)*10
    iter += 1

In fact, you can remove the if else statement and do it in a single line if you use the following:
AA[i][0] = AA[i][0] +(-1)**(i)* (iter % max_iter+1)*10

