alice-teacher Problem with number variable

Bertha Cannon bertha.cannon at asfm.edu.mx
Tue Nov 23 10:45:29 EST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/alice-teachers/attachments/20101123/7dfd0c2f/attachment.html 


More information about the alice-teachers mailing list