Cards deck problem

Gabriel Genellina gagsl-py at
Sat Oct 28 00:08:22 CEST 2006

At Friday 27/10/2006 00:48, Michael Naunton wrote:

>It is clear your professor does not understand computer science.  Switch
>to a new university now.
>As noted in the problem, a deck has 52 cards.  cardsLeft(self) therefore
>always returns 52.
>This may seem pendantic, but CS is mostly about thinking about (and thus
>naming) things clearly.  Find someone who does.

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?
At least in Argentina, it's called the same ("mazo") as the full, 
original, set of cards.
The "remaining cards" interpretation for "deck" would be consistent 
with the required interfase: shuffle, dealCard, cardsLeft...

> > shuffle(self) - Randomizes the order of the cards
> > dealCard(self) - Returns a single card from the top of the deck, and
> > removes the card from the deck.
> > cardsLeft(self) - Returns the number of cards left in the deck.

Gabriel Genellina
Softlab SRL 

Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! -

More information about the Python-list mailing list