If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Windows
PsychoPy version (e.g. 1.84.x):
What are you trying to achieve?:
In my experiment the participant must click on a point on a slider scale , where there is a topic on each end. Wherever they click , the topic that is closest (for some conditions) or farthest (for one condition) on the scale get recorded for use for a later part of the experiment. the slider goes from -3 to +3
What did you try to make it work?:
I used this coding component pasted below:
if Type=='C':
if Choose_slider.getRating() is not None and Choose_slider.getRating() >=3:
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==2:
Answer=ChoiceA
else:
Answer=ChoiceB
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(1):
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-1):
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-2):
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-3):
Answer=ChoiceB
else:
Answer=ChoiceA
elif Type=='HI':
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==3:
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==2:
Answer=ChoiceA
else:
Answer=ChoiceB
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(1):
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-1):
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-2):
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-3):
Answer=ChoiceB
else:
Answer=ChoiceA
elif Type=='LI':
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==3:
Answer=ChoiceA
else:
Answer=ChoiceB
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==2:
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(1):
Answer=ChoiceB
else:
Answer=ChoiceA
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-1):
Answer=ChoiceA
else:
Answer=ChoiceB
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-2):
Answer=ChoiceA
else:
Answer=ChoiceB
if Choose_slider.getRating() is not None and Choose_slider.getRating() ==(-3):
Answer=ChoiceA
else:
Answer=ChoiceB
What specifically went wrong when you tried that?:
The code works and prints out the results at the end. The if statements with the negative numbers print out the correct prompts, but the if statements with the positive numbers prints out the opposite/wrong prompts.
I tried flipping what it should print as the answer , but it still prints out the same result
I am not sure what to do next. Please help?