-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippet.txt
57 lines (44 loc) · 1.03 KB
/
snippet.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Exit loop:
in_code:
Begin Experiment:
myCount = 0
Begin Routine:
myCount = myCount + 1
if myCount > 3:
loop_practice.finished = True #loop_practice = loop name
Break/routine/loop + keyboard:
Each Frame:
key = kb_end_training.keys
if key == 'y':
continueRoutine = False
elif key == 'n':
practice.finished=True
continueRoutine = False
Feedback:
Begin Routine:
# feedback statement:
if kb_component.corr: # equivalente a kb_component.corr == 1
msg = "Correct! RT={:.3f}".format(kb_component.rt)
else:
msg = "Oops! That was wrong"
Controbilanciamento 2 blocks:
In-code routine
Begin Routine:
num = int(expInfo["participant"])
if (num % 2) == 0:
nb_loop_ita = 0
nb_loop_eng = int(expInfo['eng'])
else:
nb_loop_ita = int(expInfo['ita'])
nb_loop_eng = 0
Loop Exp{
Loop1{}
Loop2{}
In-code routine
Begin Routine:
temp = nb_loop_ita
nb_loop_ita = nb_loop_eng
nb_loop_eng = temp
}
add data:
thisExp.addData("nome_colonna", "data")