- Going over Exercise 4 - perceptual grouping task
- What's the point of this experiment anyway?
- Setting positions
- Flipping a shape
- Collecting and writing responses
- Refactoring (getting rid of redundant code), anticipating redundancy
- How to know if your code is as good as it can be?
- Using a library with custom functions
- Further practice working with dictionaries: iterating, printing, and sorting
- In class exercise 1: read in someTrialData.txt (inside commons\Exercise 4) into a dictionary using the importTrials function. Print the dictionary to outputFile.txt using the printing function from myFirstLibrary. The output file should look just like someTrialData.txt, but without the header row.
- In class exercise 2:
- Instead of generating the trial logic at run-time, write a function inside generateTrials.py that pre-generates all the trials and writes them to a file called subjCode_trials.csv, then import the function, run it, get the file, read it into a list of dictionaries, and iterate through it.
New material, if there's time
- Using the mouse
- Playing sounds
- Showing images