MC Question point calculations.
I am trying to use OS to make a simple calculation of the points of randomly selected MCQ's. Before the main loop I have set the sequence to zero with the following inline script code to break the loop after a certain amount of trials:
Then the loop, the sequence, and the form follow. And after MCQ's and the Logger the following inline script code is placed to calculate the correct or incorrect answered points (it would not do sooner because it would not recognize that there is a response variable):
var.Point = 1 if var.response == var.Correct_Answer else 0
var.Grade = 'Sorry, better study next time' if var.Pika = range(0,4)
var.Grade = 'Barely made it' if var.Pika = 5
var.Grade = 'Nice' if var.Point = range(6,9)
var.Grade = '10 Points, Good' if var.Point = 10
var.Grade = '11 Points, Good' if var.Point = 11
var.Grade = '12 Points, Good' if var.Point = 12
var.Grade = '13 Points, Good' if var.Point = 13
var.Grade = '14 Points, Good' if var.Point = 14
var.Grade = '15 Points, Good' if var.Point = 15
My aim is to present var.Grade to a sketchpad for the students to see after the test. But there is a syntax error in line 3 it says:
code: var.Grade = 'Sorry, better study next time' if var.Point = range(0,4)
exception type: SyntaxError
exception message: invalid syntax (, line 3)
time: Sun Aug 07 18:41:03 2016
I tried adding more "=" and make them in two's like so "==" as well as different if/then lines, but the same error was persistent throughout. I could not find this problem in the forum specifically.
Also, one other thing seems to be raising its head. Why should participants see how we have programmed the experiment in OS? For instance, there are correct answers in the table and I do not want participants to see those. Can OS run constantly per each student on the same computer and not reveal itself every time the experiment ends?