Home Project Folders Resources How Do I? MWForum
Site Map Search Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: MIA, Ask an Expert: dice counts
From: "Ask an Expert - Question" <askanexpert@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 May 2006 09:26:56 -0500

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.


    © copyright 2001 - 2006