> cards = {"Ace", "Two", "Three", "Four", "Five", "Six", "Seven",
> "Eight",
> "Nine", "Ten", "Jack", "Queen", "King"}
> card_types = {"Diamond", "Heart", "Spade", "Club"}
{} means they are dictionaries but you don;t provide key:value pairs.
You probably want lists here not dictionaries
mond, Club, or Spade)
- Original Message -
From:
Bob
Gailer
To: Nathan Pinno ; Tutor mailing list ;
Yoo, Danny
Sent: Wednesday, August 03, 2005 1:03
PM
Subject: Re: [Tutor] I need advice about
which way to go.
At 11:36 AM 8/3/2005, Nathan Pinno wrote:
Here is the code
the
At 11:36 AM 8/3/2005, Nathan Pinno wrote:
Here is the code
then:
I'll throw in some suggestions. 1 - check for balanced parentheses. This
has bit you before and you have several lines below with unbalanced
parentheses. 2 - since Python indexes start at 0, take advantage of this.
Use random.choice
a ==
1: a =
cards[0]
playertotal = playertotal + 1 elif
a == 2: a
= cards[1]
playertotal = playertotal + 2
Now do you have an idea of what I'm pointing to?
- Original Message -
From:
Bob
Gailer
To: Nathan Pinno ;
At 11:12 AM 8/3/2005, Nathan Pinno wrote:
Sorry about that, I thought it
was clear that n = number randomly chosen. I
was thinking of if the number was a five, it would choose a card with a
five
on it. I don't want to have to code stuff that I have to repeat again and
again.
That's what classe
Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor mailing list"
Sent: Wednesday, August 03, 2005 1:14 AM
Subject: Re: [Tutor] I need advice about which way to go.
> Hi Nathan,
>
> The problem with this problem descripton is that you have an idea
> clear in your own head but
Hi Nathan,
The problem with this problem descripton is that you have an idea
clear in your own head but the rest oif us only have the words.
So...
> I am writing a poker game and a blackjack game.
Two separate games or one game that can play both?
> I was wondering which way would be Python sma
On Tue, 2 Aug 2005 10:12:28 +0100
"Alan G" <[EMAIL PROTECTED]> wrote:
>
> > I forgot to tell that I use Python 2.2.3. When I first got Python, I
> > got
> > 2.4.1, but it refused to run the second time. So I went and got
> > 2.2.3. Your answer would make sense if I had 2.4.1, but I don't.
>
>
Tutor mailing list"
Sent: Tuesday, August 02, 2005 12:02 AM
Subject: Re: [Tutor] I need advice.
>I forgot to tell that I use Python 2.2.3. When I first got Python, I got
> 2.4.1, but it refused to run the second time. So I went and got 2.2.3.
> Your
> answer would make
I think I'll leave this one for someone else. I got too confused too quick.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor mailing list"
Sent: Tuesday, August 02, 2005 1:47 AM
Sub
> I forgot to tell that I use Python 2.2.3. When I first got Python, I
> got
> 2.4.1, but it refused to run the second time. So I went and got
> 2.2.3. Your answer would make sense if I had 2.4.1, but I don't.
Version 2.3 should work and has the datetime stuff I think
- just checked and it does
> I want to write a program that will convert time in any other
> time zone to my time zone.
This is a deceptively complex task. There are around 40 timezones
varying by anything from 15 minutes to 2 hours. And some places
change timezone throughout the year. Others have multiple daylight
savi
quot;Nathan Pinno" <[EMAIL PROTECTED]>
Cc: "Tutor mailing list"
Sent: Monday, August 01, 2005 11:41 PM
Subject: Re: [Tutor] I need advice.
>
>
> On Mon, 1 Aug 2005, Nathan Pinno wrote:
>
>> I want to write a program that will convert time in any other time z
On Mon, 1 Aug 2005, Nathan Pinno wrote:
> I want to write a program that will convert time in any other time zone
> to my time zone. Would it be better to use the Python time molecule or
> just a whole bunch of if statements?
Hi Nathan,
I'd recommend looking at the 'datetime' Python module. G
14 matches
Mail list logo