How to pseudo randomize trials and make a variable ITI/delay

Hello all. I am VERY new to PsychoPy. So please excuse me if this is a rudimentary question. I have no experience with coding, and my Python book hasn’t helped me yet with this.

Briefly, I am trying to create a standard classical conditioning task where one tone predicts a burst of white noise (CS+) and another tone predicts the absence of such noise (CS-).

I have been using the builder view and have been able to get this simple task done, but I need to pseudo randomly present the CS+ and CS- so that each is presented 8 times, and no more than twice in a row.

I also need to have a variable ITI or delay which ranges from 45 - 75 seconds in duration with an overall average of 60 seconds.

ANY help would be SO appreciated.

1000Hz_CS_v2.xlsx (8.5 KB)

Here is my conditions file if necessary.