[LON-CAPA-users] Forcing integer answer

Lars Jensen lon-capa-users@mail.lon-capa.org
Wed, 20 Nov 2002 11:41:20 -0800 (PST)


Hi Ray,

Thanks for your answer - this solution clearly will work.

Thanks again,
Lars.

On Wed, 20 Nov 2002, Ray Batchelor wrote:

> Hi Lars,
>  I have done things like this, where the number of sig figs allowed is a 
> variable from the perl script.
> 
> <responseparam description="Significant Figures" type="int_range,0-16" 
> default="$siglM[0],$sighM[0]" name="sig" />
> 
> Ray
> 
> On November 20, 2002 11:10 am, Lars Jensen wrote:
> > Hi Ray,
> > 
> > Thanks for the answer. The problem with your solution is that sometimes
> > the answer may not have 3 digits. I was looking to see if there is some
> > other way...?
> > 
> > Lars.
> > 
> > On Wed, 20 Nov 2002, Ray Batchelor wrote:
> > 
> > > Hi Lars,
> > >                For those particular numbers you could set the sig figs to 
> > > three.
> > > <responseparam description="Significant Figures" type="int_range,0-16" 
> > > default="3,3" name="sig" />
> > > 
> > > Of course if they then entered 153.6 they would just get the message 
> "Please 
> > > adjust significant figures" and would not be discounted a try.  
> > > Probably not quite what you want.
> > > 
> > > Ray
> > > 
> > > On November 20, 2002 10:13 am, Lars Jensen wrote:
> > > > How do I force the student to enter an integer answer. Say that the
> > > > answer is 155 and I want to allow 154, 155, 156 as only possible
> > > > answers. Values between these are not allowed. If I set the tolerance to
> > > > 1 the system allows values in between, and setting the format to "0f"
> > > > only affects the display, not the student input. Is there some way I can
> > > > force the answer to be an integer?
> > > > 
> > > > Lars.
> > > > 
> > > > --
> > > > Lars Jensen, TMCC/Vista B200, 7000 Dandini Blvd, Reno NV 89512-3999. 
> > > > Internet: <jensen@physics.unr.edu>, http://www.scsr.nevada.edu/~jensen
> > > > Tel: 775.673.7113  FAX: 775.674.7592
> > > > 
> > > > _______________________________________________
> > > > LON-CAPA-users mailing list
> > > > LON-CAPA-users@mail.lon-capa.org
> > > > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> > > > 
> > > > 
> > > 
> > > _______________________________________________
> > > LON-CAPA-users mailing list
> > > LON-CAPA-users@mail.lon-capa.org
> > > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> > > 
> > 
> > --
> > Lars Jensen, TMCC/Vista B200, 7000 Dandini Blvd, Reno NV 89512-3999. 
> > Internet: <jensen@physics.unr.edu>, http://www.scsr.nevada.edu/~jensen
> > Tel: 775.673.7113  FAX: 775.674.7592
> > 
> > _______________________________________________
> > LON-CAPA-users mailing list
> > LON-CAPA-users@mail.lon-capa.org
> > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> > 
> > 
> 
> _______________________________________________
> LON-CAPA-users mailing list
> LON-CAPA-users@mail.lon-capa.org
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
> 

--
Lars Jensen, TMCC/Vista B200, 7000 Dandini Blvd, Reno NV 89512-3999. 
Internet: <jensen@physics.unr.edu>, http://www.scsr.nevada.edu/~jensen
Tel: 775.673.7113  FAX: 775.674.7592