Howdy, Stranger!

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

Supported by

Prensent Stimuli

Hi,
I just try to presenting stimuli that contain R and B letter for charity work with younger children. The stimuli will be like this
RRRRRRRRRRRRRRRRRBRRRRRRRRRR
RRRRRRRRRBRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRBRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRR
I couldn't present them with list as error emerged saying "list object has no attribute decode"..ok i can get another solution replace them with image. But I still struggle to find the solution. These stimuli contain 4 random trial. Any help would be appreciated
Thanks

Comments

  • Not sure if I understand you correctly, but wouldn't this work:

    def create_random_stim():
        sequence = ["R"] * 27 + ["B"]
        expyriment.design.randomize.shuffle_list(sequence)
        return expyriment.stimuli.TextLine("".join(sequence))
    
    stim1 = create_random_stim()
    stim2 = create_random_stim()
    stim3 = create_random_stim()
    stim4 = create_random_stim()
    
    Thanked by 1Tanto

    Florian Krause (Developer)
    http://www.expyriment.org

  • Yes many thanks Florian! and sorry for frequently asking you terrible question.

Sign In or Register to comment.