Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Counting correct answers

edited June 2016 in OpenSesame

Hi
I've a "simple" problem, but I did'nt find a solution yet being new at Python.
I just want to have the feedback not as accuracy ( in %) but as a simple counting of correct answer to have a clear feedback for children (you have N good answers).
Thanks for help.
Tom

Comments

  • edited 3:52PM

    Hi Tom,

    OpenSesame 3.1 has a responses object that contains the entire response history. So you can use that to, among things, determine how many correct responses were given:

    # Get a list of correctness values, but exclude those that are None (i.e.
    # when correctness was undefined, for example during instruction screens)
    l_correct = [correct for correct in responses.correct if correct is not None]
    # Get the sum of all correctness values, that is, the total number of correct
    # responses
    n_correct = sum(l_correct)
    print('n_correct = %d' % n_correct)
    

    See also:

    OpenSesame 3.1 is still in testing, but I think that it's stable enough now that you can use it if you need this functionality.

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.