Howdy, Stranger!

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

Supported by

Problem creating a variable using inline script

edited June 2017 in OpenSesame

Hi !

I am trying to develop task for my PhD research. Following is the description of the task:

Time course of the stimulus presentation in the letter delayed match-to-sample task. A black “+” symbol is displayed at the center of the screen for 500 ms as a reminder to the participants to pay attention. Subsequently, a blank screen is displayed for approximately 600 ms before a letter loop appears. In a clock-like loop, 4–10 upper case letters are displayed in a random order for 1,500 ms each. After the letter loop disappears, the screen remains blank for 1,300–1,800 ms before a lowercase letter appears at the center of the screen for a further 1,500 ms. Participants must determine whether this letter was among the letters in the clock-like loop (irrespective of case). Subsequently, another blank screen is displayed for 1,000 ms, after which the task ends

I'd like to display a random strings of uppercase alphabets which range from 4-10. For this I've written the following code.

variable1 = lambda: random.choice(string.ascii_uppercase) # randomly generating letters
letter = print(variable1()) # assigning the value of variable1 to an experimental variable 'letter'
exp.variable = 'letter' #making the variable 'letter' available elsewhere in my experiment

I am getting the following error while starting the experiment

Can someone please help me solve this :(

Thanks
Vatsal.

Comments

Sign In or Register to comment.