[squeakland] Etoys - arrays/lists?
Yoshiki Ohshima
yoshiki at vpri.org
Wed Oct 12 13:58:51 EDT 2011
At Wed, 12 Oct 2011 07:23:36 -0400,
R.D. Latimer wrote:
>
> Thanks,
> I'll try Yoshiki's particle version. For instance, in a simple coin toss program, it may be good to store percentages of heads/tails for numerous trials, like flipping
> a coin 10 times, get the percentage of heads, and run this trial 1000 times.
> Or pick 50 random numbers from 1-500 and see how many match, are do they tend to be all unique.
> Or in a projectile program, it may be good to store x,y positions in two arrays/lists, one for x positions, one for y positions.
Just food for thought, here is one instance of such:
http://squeakland.org/launcher?http://dev.laptop.org/~yoshiki/etoys/MonteCarlo%20Pi.003.pr
In fact, using real objects x and y would be another way to do it.
For each try, you create a copy of small rectangle and set its x and y
to the value you want to record.
-- Yoshiki
More information about the squeakland
mailing list