Hi Dominique,
Thanks for the response! At first I was a little confused about the XML you posted on the website
(1) It stated in the global variables: # Set all letters of the alphabet as variables a = 0; b = 0; c = 0; d = 0; ...; X = 0; Y = 0; Z = 0;
I just couldn't figure out why that was important for partial credit, until I realized I could just delete it (It was probably something left-over from another question)
(2) In the global variables you defined: x={-100:100}; d=diff(["x"],["x^2"],1);
I didn't understand why that was there either, until I realized I could erase that too, and put the x={-100:100} in the local variables of part 1.
(3) Then I was stumped by: d0=diff([_r[0],["x"],100); in particular the _r
I can only guess that this must be a placeholder that I had never seen (In your online section on place holders you list _0 _1 ... and _u) I am guessing that _r is a place holder for a list (?), the list of answers (?) (in this case [_0,_1]), and _r[0] is the first entry in that list (?)
(4) I still don't understand the d=diff(["f(x)"],["g(x)"],N) function. In your online section on the diff( ) function you state that d[0] is a random value of a list, whereas d[0] looks like the first entry of the list d. Not quite sure what the role of the N is either.
Thanks for the reply though, It took me a while to figure out what it all meant, but I think I can now do the partial credit in the algebraic formula case (even without understanding the use of the diff( ) function)
In fact I don't really know how the algebraic formulas does the grading: I always assumed that the Moodle algorithm would compute the answer for a (random) number of points and see if it matches with the given answer. So I am not sure why for partial credit with multiple parts we are using this d=diff(["f(x)"],["g(x)"],N) function instead.
Again thanks Dominique, much appreciated!
Ton B