How to add loop?

Hello,
I’m working on a PsychoPy experiment where participants engage in a task involving listening to sounds , answering (by saying sentence ), and then viewing image (lets call it X) and sound (Y) and then they have to press on keyboard for final answer of image and sound (correct or no) . The task comprises 20 trials (20 image X and sound Y) , managed through an Excel file. Every 4 trials, participants receive one of five possible rewards, presented randomly. The experiment requires displaying rewards at the correct intervals. I need assistance with setting up and creating loops for trials, managing reward logic, can anyone help please ?

You can have a reward routine with code in Begin Routine to skip if it isn’t one of the every 4 trials

if trials.thisN % 4 < 3:
     continueRoutine = False

im sorry I didn’t understand , I have a routine (sound-image) , and another routine for awards , and I have two excel files (one for 20 trials image sounds), and the other for awards , so where should I add the loop? and where should I add the code ? is there a way I can share it with you ?