I am trying to create a question in moodle where students get a random set of resistor colors to determine its value.
Example:
1st = {black,brown,red,orange,yellow,green,blue,violet,gray,white};
2nd = {black,brown,red,orange,yellow,green,blue,violet,gray,white};
3rd = {black,brown,red,orange,yellow,green,blue};
4th = {red,gold,silver};
where students get a random set [1st - 2nd - 3rd - 4th].
Also I want to assign a weight for each color .. like black =0, brown = 1, .. etc
I tried several hours to come up with a solution, but I failed.