How to vary in system output based on input of a participant
I am currently trying to set up an experiment via OpenSesame. The idea is that a participant will fill in a questionnaire and after indicate how many questions (out of 10) they expect to answer correctly. Based on their input, the output is aimed to differ. Specifically, if a participant indicates that they expected to answer between 6 and 10 questions correctly, I want the software to randomly generate a number between 0 and 4 and communicate to the participant that that is the actual amount of correct answers. In contrast, when the participants expect to answers between 0 and 4 questions correctly, I am trying to make the system communicate a random value between 6 and 10.
Now, I am struggling to implement this. I've watched tutorials but I can't figure it out. I do not know if I need specific components to implement this, or adapt the script, or something else. Can anyone help me?