[Thread Prev] [Thread Next]
This is an automatic message sent from the web form at:
http://mia.openworldlearning.org/mwforum.htm
from: Damian <dnicetin@xxxxxxxxxxxx>
date: Thu May 18 01:03:37 2006
Hello
I have a question.. I have written the following program to simulate the
results from a dice roll and it works fine..
to dice
make "roll random 6
if :roll = 0 [make "one :one + 1]
if :roll = 1 [make "two :two + 1]
if :roll = 2 [make "three :three + 1]
if :roll = 3 [make "four :four + 1]
if :roll = 4 [make "five :five + 1]
if :roll = 5 [make "six :six + 1]
end
to diceroll :n
make "one 0 make "two 0 make "three 0 make "four 0 make "five 0 make "six 0
repeat :n [dice]
print "one print :one
print "two print :two
print "three print :three
print "four print :four
print "five print :five
print "six print :six
end
My problem is, that I want to change this procedure so that it counts the
number of rolls that it takes before I get the values 1, 2, 3, 4, 5 and 6 (i.e
a complete set of numbers, but not necessarily in numerical order)
HELP!!!, Im stuck. are there any Logowriter Guru's out there that can help?
*****************************
OpenWorld Learning
http://www.openworldlearning.org
Previous by thread:
MIA, Ask an Expert: calculator feature in Microworlds
Next by thread:
Re: MIA, Ask an Expert: dice counts
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.
|