alice-teacher random number question

William Stanard wstanard at palmertrinity.org
Mon Nov 1 12:39:49 EDT 2010


Ella,
Actually, the way the code is written, 5 will be less than the random number most of the time... If you are looking for a more equitable distribution between If... and Else... you might want to narrow the random range to, say between 0 and 10. To see your random number, create a variable and use it to display the random number generated... see the attached.
Bill

William W. Stanard
Palmer Trinity School
Miami, Florida
(305) 969-4239

The box does not exist

From: Ella Glazer [mailto:ella.glazer at gmail.com]
Sent: Monday, November 01, 2010 12:13 PM
To: Alice educators
Subject: alice-teacher random number question

Is there any way to show a random number?
I am trying to play a simple game with random numbers and I would like to know what is coming up.  The number (0 - 100) most of the time is less than 5.  Attached is the code.  If the number <5 (should actually be <50) the cow is appears green else the cow is blue.

What am I doing wrong?

Thanks





PTS CONFIDENTIALITY NOTICE: This e-mail and any documents, files, and previous messages attached to it may be privileged, confidential or exempt from public disclosure under applicable law.  If you are not the intended recipient, you are hereby notified that any dissemination, distribution or duplication of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately and delete all copies. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/alice-teachers/attachments/20101101/6dcd8542/attachment.html 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/alice-teachers/attachments/20101101/6dcd8542/attachment-0001.html 


More information about the alice-teachers mailing list