How to alternate between stimuli (additions, subtractions) in a random order

Hi,
I am trying to create a math task in which the participant must mentally solve additions and subtractions. Additions and subtractions must be presented alternately: first an addition, then a subtraction, and so on.
I have created an excel file, in which the additions appear in the first column and the subtractions in the second column.
image

I put a loop around the routines, in which I also included fixation crosses between the operations.


In the trials properties, I selected “random” because I want additions and subtractions to be randomly assigned, but never repeated, and then nReps=1 to alternate between additions and subtractions.
image

In this way, the program presents additions and subtractions alternately and never repeat them.
However, the order of the operations is not entirely random, because additions and subtractions are always taken by the same row. For example, (see the first image related to the excel file), an order can be: 12+47, 75-34, 21+74, 67-42, 26+53, 89-31, and so on. Additions and subtractions are always coupled by row. Maybe I should create two distinct files (one with additions, and one with subtractions), but I don’t know how to organise the Builder…

I would really appreciate if someone can help me with this.

Thanks in advance!

if trials.thisN % 2 == 0:
     thisSum = Add
else:
     thisSum = Sott