Loop - two columns and two different type of order

What are you trying to achieve?:

I have a loop where 5 words are displayed to the participant. I am trying to get the five words (bread, dance, price, sheet, wheel) in random order. At the same time always the third word has to be displayed in the “monotype corsiva” font and all the other words in calibri. I am new to coding and kind of lost on this. If someone could help me out or knows a relevant article I would be very thankful!

Best, Nicolas

Does your word_font code work in random order? If so, then you could use the following code

# Begin Experiment
word_fonts = ['calibri','calibri','monotype corsiva','calibri','calibri']

# Begin Routine
word_font = word_fonts[trials.thisN]

I found a way! Thank you for the help

That’s great to hear. Please could you post your solution if it differs from mine?

I just created two lists.

words = [‘bread’, ‘dance’, ‘price’, ‘sheet’, ‘wheel’]
fonts = [‘calibri’, ‘calibri’, ‘monotype corsive’, ‘calibri’, ‘calibri’,]

and then shuffled the list words


and then called the individual objects.

1 Like