Re: [Tutor] deck dealing program

2005-08-09 Thread Nathan Pinno
nklin--- - Original Message - From: luke To: tutor@python.org Sent: Monday, August 08, 2005 12:38 AM Subject: [Tutor] deck dealing program from random import randint   def identify_card(n):    cardname = ""    royals =

Re: [Tutor] deck dealing program

2005-08-08 Thread luke
Just offering my take on the problem. hope it helps someone. - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Monday, August 08, 2005 2:02 AM Subject: Re: [Tutor] deck dealing program > Are you: > a.) Having trouble with the code and looking for help? >

Re: [Tutor] deck dealing program

2005-08-08 Thread python-tutor
Are you: a.) Having trouble with the code and looking for help? b.) Looking for suggestions on how to improve the code? c.) Offering the code as a demo for Nathan et al.? I was just doing stuff along the same lines and was having fun seeing the different approaches to the same problem. -

[Tutor] deck dealing program

2005-08-07 Thread luke
from random import randint   def identify_card(n):    cardname = ""    royals = ["Jack","Queen","King","Ace"]    temp = n % 13    if temp > 8:    cardname += royals[temp-9]    else:    cardname += str(temp+2)    cardname += " of "       suits = ["Spades","Hearts","Diamonds","Club