Gavin,
The problems are quite short. I will try this and let you know how it works. Thanks.
I tried it and this is what I received:
(1 pt) 1. The y-intercept of the intersection of (y=1-x) and (y=x^3-x) is ans_rule(3)
2. All continuous functions are differentiable. ans_rule(3)
I tried to tweak the t/f example of webwork here is my version:
#DESCRIPTION #ENDDESCRIPTION
DOCUMENT(); # This should be the first executable line in the problem.
loadMacros(PG.pl, PGbasicmacros.pl, PGchoicemacros.pl, PGanswermacros.pl, PGauxiliaryFunctions.pl);
TEXT(&beginproblem); $showPartialCorrectAnswers = 0;
for ($i = 0; $i < 18; $i++) {$v[$i] = random(1, 10, 1);} $n = random(3,8,1);
@questions = (); @answers = (); qa(~~@questions, ~~@answers, "\( $v[0](x + $v[1]) = \)", "$v[0]*x+$v[0]*$v[1]",
"\( $v[2]($v[3] x + $v[4]) = \)", "$v[2]*$v[3]*x+$v[2]*$v[4]",
"\( $v[5]($v[6] x + $v[7]) = \)", "$v[5]*$v[6]*x+$v[5]*$v[7]",
"\( $v[8](x + y) = \)", "$v[8]*x+$v[8]*y",
"\( $v[9](x + y + $v[10]) = \)", "$v[9]*x+$v[9]*y+$v[9]*$v[10]",
"\( $v[11]($v[12] a + b + $v[13] c) = \)", "$v[11]*$v[12]*a+$v[11]*b+$v[11]*$v[13]*c",
"\( $v[14](x + $v[15] y) = \)", "$v[14]*x+$v[14]*$v[15]*y",
"\( $v[16]($v[17] + x) = \)", "$v[16]*$v[17]+$v[16]*x",
); $thisCourse = $inputs_ref->{'course'};
TEXT(EV2(<<EOT)); Enter Directions Here $PAR You must get all of the answers correct to receive credit.$BR EOT @slice = NchooseK(scalar(@questions),$n);
TEXT( &match_questions_list(@questions[@slice]) ); &ANS (fun_cmp( [ @answers[@slice] ], var=>['x','y','a','b','c'] ) );
ENDDOCUMENT(); # This should be the last executable line in the problem.
Could you check out my problem by clicking here.
smith 123456
is the user/password
SET0 prob #1 I
would like to have answer box to the right of the question and be able
to adjust the size of the answer box. I am still trying to get yours to
work. Maybe you could look at the code of my version above and fix that
if I can't get yours to work (even though it probably does.)
Thanks,
Gregg
<| Post or View Comments |>
|