From: P G. L. <gl...@um...> - 2005-12-31 05:16:35
|
Hi guys (esp. John), I have a question about the behavior of interval_cmp (from John's extraAnswerEvaluators.pl macro file). I'm using it in a brutally unintended way, which may explain why I am (or it is) confused. In a calculus problem, I want students to find critical points and indicate if they correspond to maxima, minima, or neither. And I don't want to give away in advance how many points there are. So I was trying to coerce interval_cmp to do this for me by having it evaluate a set of "intervals," viz., interval_cmp( "(-2,min),(3,max)", 'unions'=>'no', 'strings'=>['none','min','max','neither'] ); This works very well, until there is no maximum (or no minimum), in which case interval_cmp( "(-2,min)", 'unions'=>'no', 'strings'=>['none','min','max','neither'] ); has trouble: as student entering (-2,min) has her/his answer marked wrong with the message "The parentheses for your list should be removed." Removing the parentheses works if the interval_cmp call is changed to interval_cmp( "-2,min", 'unions'=>'no', 'strings'=>['none','min','max','neither'] ); So I guess I have a couple of questions. Or three. 1. Have I overlooked a better way of checking this type of problem? 2. Is there some feature of interval_cmp that I can change to get a more intuitive (at least from the perspective of a student) behavior? and/or 3. Is there an easy tweak to interval_cmp that will have the same effect? Thanks, and Happy New Year, Gavin p.s. I also have a problem where I want to check the answer "(0,min),(a,max)", where a is a constant. My rather coarse solution was to copy the interval_cmp evaluator into the problem, calling it my_interval_cmp, and add the variable 'a' to the Parser Context. Is there a better way of doing this? -- P. Gavin LaRose, Ph.D. Program Manager (Instructional Tech.) Math Dept., University of Michigan gl...@um... "There's no use in trying," [Alice] 734.764.6454 said. "One Can't believe impossible http://www.math.lsa.umich.edu/~glarose/ things." "I daresay you haven't had much practice," said the Queen. - Lewis Carrol |