Restarting variables

Dear friends,

I have achieved a lot in trying to build a template for training students with easy things that sometime just need a bit of practice (like integer addition). This desmos could be template that could be adapted to any kind of easy Math practice.

I have 2 major things that I still need to overcame:

  1. I need to be able to give the student the opportunity to retry again and get a better grade, so I need the variables that store the grade to be restarted. As I understand there is now way to remove the items from a numberList, I understand that I must put in the numberList the opposite number so it will cancel out when all numbers in the list are added in a total. But I am unable to achieve it. The variables I need to restart are C and T

  2. After I achieve the first part, I also need is a numberList with all grades history (grades of all attemps) so I can pull the higest grade from that numberList. I tried but I did not succed.

Do you think you can give me a push on this. I feel my head is going to explode!. I tried for hours but I could not get it.

Integers operations • Activity Builder by Desmos

Thank you in advance!

You could have a variable, n here, that captures the length of I_C, but is 1 otherwise. Not sure how/when you want to activate that. Then, C can be:
C=total(I_C[n...length(I_C)])
so everything would be stored in I_C, but C would only total from element n on.

Thank you so much. It amazes me how much you know! You missed a parenthesis at the end. I retyped in case somebody runs through the same problem.
Just to clarify the notation in here: total function is adding all items of the matrices values with indexes from n to length(I_c).

C=total(I_C[n...length(I_C)])

Right. Some of those list functions are handy. You can specify elements in the manner I did. You can use any list (i.e. they don’t need to be in sequence).

You can also set conditions. For example to make a new list, N, that only includes the positive values in list L. N=L[L>0]