WeBWorK Problems

Adding re-randomization

Re: passing parameters [was: Adding re-randomization]

by D. Brian Walton -
Number of replies: 0
On the topic of allowing parameters to be passed into problems...

As an example, I have written an algebra problem to practice synthetic division and factoring of polynomials where I have a parameter that specifies the number of unique roots and another for the maximum multiplicity. I then generate a random polynomial and write it in standard form. Currently, there is a different problem for various settings, but the only thing that is changing is the value assigned to that parameter. I think this is closest to what Dick Lane was suggesting.

As another example, on a multi-part problem, it could be beneficial to allow the instructor to assign the values of the individual parts. At present, this is hard-coded in the problem. So an instructor that wants a different weighting of the parts must create a duplicate of the problem. (Note: This might actually be a separate issue, although currently it might be resolved using parameters.)

As a third example, some word problems often use locations or names that might have significance for a particular school. For the sake of sharing such problems, it could be nice to make the problem customizable by adding an option to choose names that are appropriate. (This makes me think of a problem almost like a MadLib! Please enter a name followed by an adjective. :-)

A fourth example is a class of problems that took me quite a bit of time to develop. This is where I construct a graph of a function with intervals of monotonicity and concavity whose endpoints are always integers, so that I can ask students to identify based on a graph where a function is increasing, decreasing, concave up, or concave down. The code only needs to know the number of turning points, or similar parameter. It just feels wasteful to implement the same problem with multiple files simply to add another turning point, etc.

- Brian

D. Brian Walton
James Madison University