Display experiment progress
I am programming an experiment in OpenSesame and I want the progress that a person has done in it to be displayed in the bottom right corner as a percentage.
I am calculating the percentage with an inline script in this way:

and then displaying the progress in the two canvases in those two ways (one is OpenSesame's fixation_canvas object and the other one is an inline script):



However, when I run the experiment, the text remains "Progress: 0%" the entire time and the number doesn't change to reflect the actual progress. What is it that I'm doing wrong?

Comments
Hi Nick,
You're running into a weird property of Python 2 (but not Python 3), which is that integer divisions always return
intvalues (and the decimals are discarded). In other words:5 / 10 == 0To avoid this, you can add a
floatsomewhere in the equation, such as1.(the point indicating that it's afloatand not anint) . Like so:1. * 5 / 10 == 0.5Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!