-
Notifications
You must be signed in to change notification settings - Fork 0
/
Imposter Syndrome Study.py
65 lines (53 loc) · 1.93 KB
/
Imposter Syndrome Study.py
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
58
59
60
61
62
63
64
65
from psychopy import visual, event, core, gui
# Create a window
win = visual.Window(size=(800, 600), color=(1, 1, 1), fullscr=False)
# Create an introduction text
intro_text = visual.TextStim(win, text="Welcome to the Imposter Syndrome Study!\n\n"
"You will be presented with a series of tasks.\n"
"After each task, you will rate your confidence and perceived competence.\n\n"
"Press any key to continue.", color=(-1, -1, -1))
intro_text.draw()
win.flip()
event.waitKeys()
# List of tasks
tasks = [
"Task 1: Solve the math problem 3 + 5",
"Task 2: Solve the math problem 7 - 2",
"Task 3: Solve the math problem 6 * 4"
]
# Function to display a task and get ratings
def run_task(task_text):
task_stim = visual.TextStim(win, text=task_text, color=(-1, -1, -1))
task_stim.draw()
win.flip()
event.waitKeys()
# Confidence rating
confidence_rating = gui.DlgFromDict({"Confidence (1-10)": "5"}, title="Confidence Rating")
if confidence_rating.OK:
confidence = confidence_rating.data[0]
else:
core.quit()
# Competence rating
competence_rating = gui.DlgFromDict({"Competence (1-10)": "5"}, title="Competence Rating")
if competence_rating.OK:
competence = competence_rating.data[0]
else:
core.quit()
return confidence, competence
# Run tasks and collect ratings
results = []
for task in tasks:
confidence, competence = run_task(task)
results.append((task, confidence, competence))
# Display results
result_text = "Results:\n"
for task, confidence, competence in results:
result_text += f"{task}\nConfidence: {confidence}, Competence: {competence}\n\n"
result_stim = visual.TextStim(win, text=result_text, color=(-1, -1, -1))
result_stim.draw()
win.flip()
# Wait for a key press to end
event.waitKeys()
# Close the window
win.close()
core.quit()