Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Running Experiment Intermittently

Dear OpenSesame comuunity,

I have an experimental challenge and I'll be thankful for your help.

I have a memory task that I am running in 2 sessions, each one in different day.

I have one words list of 100 words, which I would like to split randomly for each participant to the two sessions.

That is, to present 50 words in each session, while every participant sees different list in every session. Overall, all the participants will see all the 100 words.

I hope I'm clear enough,

Do anyone have any idea what code or loops i need to create?

I'll be grateful for any idea.


  • Hi S_H,

    You will have to do some programming. Below is proof-of-concept example with a list 6 instead of 100 items. It saves the second part of the list that you could use for the second session.

    from random import shuffle
    t6 = '[1,2,3,4,5,6]'
    print t6
    # You will have to use eval() to change the string into a list!
    t6list = eval(t6)
    print t6list
    t6listFirst = t6list[:3]
    print t6listFirst
    t6listSecond = t6list[3:]
    print t6listSecond 
    FullPath = var.experiment_path + '\\t6listSecond_' + str(var.subject_nr) + '.txt'
    print FullPath 
    file = open(FullPath, "w")
    # You will have to use str() to change the list into a string!


  • This is exactly what I looked for, Thank you so much!!

Sign In or Register to comment.