alice-teacher Problem with number variable

Bertha Cannon bertha.cannon at asfm.edu.mx
Wed Nov 24 09:50:36 EST 2010


It worked!  Thanks for suggestion, Matt.



On Tue, Nov 23, 2010 at 10:40 PM, Matthew Wasserman <mwasser at student.fdu.edu
> wrote:

> I've never tried it, but you may want to use the round function and
> display that outcome instead.
>
> On Tue, Nov 23, 2010 at 10:45 AM, Bertha Cannon
> <bertha.cannon at asfm.edu.mx> wrote:
> > Hi all,
> > We're currently implementing a score-based game in Alice, and ONE out of
> my
> > 80-something students is having trouble with the variable that keeps the
> > score: it is increasing by 0.99999, instead of 1...  some other times it
> is
> > displayed with a single decimal digit (as in 0.0, 1.0, 2.0, etc.) but
> some
> > others it shows 4 or 5 decimal digits... some other times it combines
> both
> > behaviors, as in: 1.0000, 2.0, 2.9999, 3.0000, 4.0...
> > I've tried deleting such variable and adding a new one... I've also tried
> > executing the world in different computers... nothing seems to work...  I
> > assume that number variables in Alice are doubles, but is there a way to
> set
> > them to show a fixed number of decimal digits?
> > Thanks in advance for your help,
> > Bertha Cannon
> > HS Computer Science / Computers Department Head
> > American School Foundation of Monterrey
> > bertha.cannon at asfm.edu.mx
> > _______________________________________________
> > alice-teachers mailing list
> > alice-teachers at lists.andrew.cmu.edu
> > https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
> >
> >
>
>
>
> --
> Matthew Wasserman
> cell: (908)370-6989
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/alice-teachers/attachments/20101124/d6e99dc7/attachment.html 


More information about the alice-teachers mailing list