Assignment 2: The Detection Task............................................................................1
Assignment 3A+3B....................................................................................................3
Assignment 4. String Handling..................................................................................7
Assignment 5 Reading files from multiple folders....................................................12
Assignment 2: The Detection Task
Storyboard:
1
,Pseudocode:
Start
1. Display Welcome_Screen + instructions
2. Wait until SPACEBAR click to start experiment
-force end routine
-keys 'space'
Trial
4. Make a condition file with --
|stim_name | CorrectAns | mask_img
|Assignment2\u_1.png | left
|Assignment2\u_2.png | left
---
|Assignment\a_1.png | right
|
5. Add interstimulus interval (ISI)
0.0 tot 0.45
6. Show fixation cross in the center of the screen for ... S
size [ w,h] = [53,53] px
position = [0,0]
Start time: 0.45
End time: 1.0 s
7. Display randomized picture of Amersfoort of Utrecht a_1/a_10/u_1/u_10 for ... S
Start time: 1.0
End time: 1.45 s
Set every repeat
2
, 8. Display mask randomization m1 to m4 for ... S
Start time: 1.4
End time: 1.8
Set every repeat
9. Let mask disappear and allow the part to respond after
Participant response = utrecht = LEFT , amersfoort = RIGHT
10. Record participant response
store: last key
store correct: CHECKED
correct answer: $CorrectAns
11. Check participant response with CorrectAns
12. Add +1 to is_correct = 0
13. Make a loop: repeat for 15 trials --> fix cross, random a/u, mask, answer etc.
Conditions file: killingmyselfpart2.xlsx
Looptype: random
Middle/end
14. Count number of correct answers per participant
15. Display number of correct answers per participant
End
16. Thank you for participating! screen
Code blocks used:
In ‘begin experiment’: correct_count = 0
In ‘end routine’: if Part_Resp.keys == CorrectAns:
correct_count += 1
In routine: result_screen
Result_text.text = f"You answered {correct_count} out of 20 correctly!"
Result_text.color = 'green'
Assignment 3A+3B
#Library for fast, flexible and expressive data structures
import pandas as pd
import numpy as np
3
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller everm0re. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $5.96. You're not tied to anything after your purchase.