Automatically end routine after image

Hi there,

I am having an issue with the custom code part of the builder. In the experiment, participants have 5 practice trials where they see two pairs of words, and based on their response they see a smiley face or a frowning face.

The issue I am having is that after the image is shown, it doesn’t automatically end the trial and move on to the next pair of words. I do not know what to write in the ‘end routine’ part of
the code. Below is how the code looks, just in the ‘begin routine tab’.

if(prac_resp.keys == str(CorrAns)) or (prac_resp.keys == CorrAns):
prac_resp.corr = 1
prac_resp.corr = 0

So my question is, what do I need to write in the End Routine tab? Is there something that should go in the begin routine as well?

Any help is so very appreciated
Thank you!