Skip the middle task randomly

Hi all
I am a novice and have no programming experience before.

There are 32 trails in my mini-block. The subjects need to perform three tasks in turn: encoding, visual selection and memory probe. Eight trails out of 32 trails only need to perform encoding and memory probe tasks. But I don’t know how to randomly skip the eight visual selection tasks in the middle.

Please help me.

@wakecarter I see that you have answered a similar question before, but due to my lack of experience, I can’t understand the reply to that post. I hope you can take a moment to look at my question and answer it. thank you.