WeBWorK Problems

need help coding series test problems

need help coding series test problems

by Darwyn Cook -
Number of replies: 0
I would like to present students with an infinite series, say sum 1/k^2, and have them pick which series test they would like to apply to the series. Suppose for the sake of argument they have a drop down menu that allows them to choose from the ratio test, divergence test, and p-series for this problem.

If they choose the ratio test I would like them to answer which ratio they are computing the limit of (ie (k+1)^2/k^2), the limit (1), and the conclusion of the ratio test (no conclusion). So they would stay in this part of the problem until they have correctly answered the above three questions and have figured out that they have chosen the wrong test - presumably if they had the correct answers to the above questions they wouldn't have chosen that test in the first place.

At the point where the student correctly answers the above questions I would like to send them back to the beginning until they choose a test that works correctly and can correctly apply the test.

I can't say I have a code segment to look at as I haven't a clue how to get the problem to behave this way. Well I suppose there is a while loop involved somewhere. smile