you have 2 independent variables: the number of questions and
the weight for each question. (the weight for each question might
be viewed as a number of independent variables, but would be
simplest to consider as an array of weights and the array of
weights is an independent variable.)

the total score and percentage correct are dependent
variables and easily calculated once you establish the number of
questions and the array of weights. for example, if you have N
questions and with the weight for question 0,...,N-1 given by