# How create a array for collecting previous responses.

**1**

Hello everyone.

I am trying to use Opensesame to implement a pc language related assessment.

I need to stop the test when participants accuracy is below 25% in the last 8 trials (6 out of 8).

Also, the starting point of the test depends on participants age. Children start at trial 1, while adults start at trial 50. However, if adults give incorrect responses in the first 8 trials, they must go to another set (namely trial 49), going on that alternative set until they give a correct answer, then they continue as normal.

I have been trying the following:

import numpy as np

a=np.zeros((116,1))

x=0

b=0

followed by

if var.get('response') == var.get('correct_response'):

var.get('correct')=a[x]

if x>=8:

for i in rage(x-8,x):

b=a[i]+b

if b<=2:

x=-1

x=x+1

But it is not working,

I could definitely use some help. Thanks in advance.

Young Hou

## Comments

1,001Hi,

To fix your code, consider this:

Does that help?

Eduard