Cards deck problem
bignose+hates-spam at benfinney.id.au
Sat Oct 28 02:18:23 CEST 2006
Gabriel Genellina <gagsl-py at yahoo.com.ar> writes:
> At Friday 27/10/2006 00:48, Michael Naunton wrote:
> >As noted in the problem, a deck has 52 cards. cardsLeft(self)
> >therefore always returns 52.
> Uhm, maybe it's a matter of language, but how do you name the pile of
> cards remaining to be dealt once the game begins?
In English? I'd call that a deck. However, that deck doesn't contain
52 cards any more, so a thing that behaves that way doesn't fit the
definition of "deck" in the problem.
Perhaps a better definition would have used language like "... begins
with 52 cards" or the like, and described the properties of a deck to
Is this merely pedantic? If we were describing the rules of a game to
be played by humans, yes. But in this case we're describing parameters
of a problem to be modelled in a computer, hopefully independently by
each student in a class. Getting the problem defined precisely is
essential, otherwise judging the result fairly is impossible.
(good sigmonster, have a cookie)
\ "We demand rigidly defined areas of doubt and uncertainty!" -- |
`\ Vroomfondel, _The Hitch-Hiker's Guide To The Galaxy_, Douglas |
_o__) Adams |
More information about the Python-list