Assigning participants to two conditions online

Description of the problem: I am conducting an online experiment. I would like to assign participants equally to my two conditions. For this, I used VESPR tool to assign my participants a consecutive number. After, I wrote a code at the beginning of the experiment:

if int(expInfo['participant'])%2:
    conditions = condition1.xlsx
else:
     conditions = condition2.xlsx

Finally, I created a loop and set the conditions to the conditions.xlsx file (which contains my two conditions.)
From what I understood by reading what has been written, this should have worked but I am getting the error: “condition1 is not defined” and “condition2 is not defined”
I am not sure where I have a mistake.
Thanks in advance.

Filenames need to be in quotes.

Other errors this code will give you.

conditions is not defined (unless you put conditions = ‘’ before the if statement).

Unknown resources unless you add the two spreadsheets via Experiment Settings / Online as additional resources.

If each of my conditions files included columns of images and audio, would those have to be added manually as resources too?
I’m trying to do something similar, where I define my conditions

CondFile == ''

if expInfo['Condition'] == "English":
    CondFile = "image_stimuli_en.xlsx"

if expInfo['Condition'] == "EngMixed":
    CondFile = "image_stimuli_mixed.xlsx"

Is there a better way to set this up for online use than this? Thanks!

They will either need to be all added as resources, or the relevant ones added using prepareResources in a code component.