If this template helps then use it. If not then just delete and start from scratch.
OS: macOS 10.15.7
PsychoPy version: v2020.1.2
Standard Standalone? (n) If not then what?: anaconda
I want to execute a routine when meeting 2 conditions, and I want to execute this experiment on Pavlovia.
In the builder, I wrote an if statement with something like this
trials.thisTrialN == 0 & blockC < 2
To check whether the code works properly, in the experiment, I display each of “trials.thisTrialN == 0
”, “blockC < 2
” and “trials.thisTrialN == 0 & blockC < 2
” on the screen, using the text component.
Very confusing this is that, each of the “trials.thisTrialN == 0
” and “blockC < 2
” was displayed as “true
” on the screen, but the “trials.thisTrialN == 0 & blockC < 2
” was displayed as “false
” on the screen!
Why true & true equals to false? Could anyone clarify?
Many thanks!!