guglbroad.blogg.se

Psychopy drawing a stimulus based on if statement
Psychopy drawing a stimulus based on if statement













Psychopy drawing a stimulus based on if statement code#

I’ve added a section on setting up debugging in VS Code in Getting Started, take a look once you are ready to run the code.įrom now on, create a separate subfolder for each seminar (e.g. You still could and should use Jupyter for playing with and testing small code snippets, though. However, it is (IMHO) the best Python library for developing psychophysical experiments, which is why we will use it in our course.įor this and following projects, we won’t use Jupyter Notebooks but will develop a Python program using IDE environment of your choice (I would recommend Visual Studio Code). It is not the most suitable library for writing games, for that you might want to use Python Arcade or PyGame). 18.4 Target and TimedResponseTask classesīefore we program our first game using PsychoPy, we need to spend some time figuring out its basics.18 Guitar Hero: staircase and iterator functions.17.20 The alien armada wins: missed them!.17 Space invaders: mixins and duck typing.16.9 Virtual attributes via getters and setters.15.9 Calling methods from other methods.15.6 Flexible accumulator with a subtract method.15.1.1 Classes and objects (instances of classes).15 Snake game: object-oriented programming.14.11 Bells and whistles: blinking game over message.11.4 Keeping sounds organized: dictionary comprehension.10.10 Game over, if you run out of cards.10.7 Remembering which cards were turned.

psychopy drawing a stimulus based on if statement

10.6 Limiting flipping to just two cards.10.4 Lots of cards, using list enumeration.9.8 Using dictionary to represent a card.9.3 Python function arguments/parameters.8.7 Make the square jump on your command!.8.4 Adding a square and placing it not at the center of the window.6.12 Transported by bats to a random cave.6.2 Variables as post-it stickers (mutable objects).6.1 Recall, Variables as Boxes (immutable objects).5.8 Adding prompt parameter to input_int().Function isolates code from the rest of the program.4.6 Checking that string can be converted to an integer.4.4 Checking whether a value is in the list.3.10 Counting game rounds (Exercise 11).3.7 Show remaining attempts (Exercise 8).

psychopy drawing a stimulus based on if statement

3.6 Limiting number of attempts with a break (Exercise 7).3.5 Correct end-of-game message (Exercise 6).3.4 Limiting number of attempts via break (Exercise 5).

psychopy drawing a stimulus based on if statement

  • 3.3 Breaking (and exiting, Exercise #4).
  • 2.8 Picking number randomly (Exercise 12).
  • 2.6 Grouping statements via identation (exercise #9).
  • 2.5 Conditions and comparisons (exercises 3-8).
  • 2.3 Asking user for a guess (Exercise 2).
  • Python for social and experimental psychology.












  • Psychopy drawing a stimulus based on if statement