From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: help with random number
Date: 2000/11/13
Date: 2000-11-13T00:00:00+00:00 [thread overview]
Message-ID: <8up1ve$v7t$1@nnrp1.deja.com> (raw)
In-Reply-To: 5ltu0to0o3mt8c9liev26229n9mnhi0rvu@4ax.com
In article <5ltu0to0o3mt8c9liev26229n9mnhi0rvu@4ax.com>,
mountainman wrote:
>. Like a card game I need it to pull an Ace of Spades only
> once till the game is over. Any help would be very
> appreciated.
This is a very standard beginning programming assignment
(shuffling a deck of cards).
Don't look for a built in random number generator to do this,
that's not the point of the excercise.
Instead, think about how you could use perfect coin tosses
to shuffle a deck, or think about how, when there are 37
cards left, you choose a random one of the cards left.
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~2000-11-13 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-13 5:01 help with random number mountainman
2000-11-13 0:00 ` Robert Dewar [this message]
2000-11-13 0:00 ` Pascal Obry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox