Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

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

[Thread Prev] <

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: MIA, Ask an Expert: dice counts
From: "Menefee, Mike - OC" <Mike@xxxxxxxxxxxxxxx>
Date: Thu, 18 May 2006 11:23:40 -0700


The other answers are cooler.  This is the one I came up with.  It
works, but does not provide nearly the same "tingle."



to check
if :one = 0 [stop]
if :two = 0 [stop]
if :three = 0 [stop]
if :four = 0 [stop]
if :five = 0 [stop]
if :six = 0 [stop]
announce [You have rolled at least one of each possible outcome]

I have attached an MWX example.


-----Original Message-----
From: mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
[mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Ask an
Expert - Question
Sent: Thursday, May 18, 2006 7:27 AM
To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: MIA, Ask an Expert: dice counts

This is an automatic message sent from the web form at:

from: Damian <dnicetin@xxxxxxxxxxxx>
date: Thu May 18 01:03:37 2006


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]

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

HELP!!!, Im stuck. are there any Logowriter Guru's out there that can

OpenWorld Learning

Attachment: diceroller.mwx
Description: diceroller.mwx

  • Previous 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 - 2008