inline script doesn't recognize correct response
I have this script that i use with a Keyboard response:
if var.response == var.correct_response: print(var.response) b2() else: print(var.response) b1()
But it never recognize the correct response, it directly jumps to the 'else' statement. I don't know what is going wrong. Maybe the indentation or something else. Help please.
The correct response is defined in the loop table.
Comments
Hi,
Maybe it is smart to print out 'var.response' and 'var.correct_response' before the if statement. You can also print the comparisons (print(var.response==var.correct_response)) and the types of the variables. Like that you can find out what the problem is, i.e. whether the variables have the values you expect them to have.
Eduard