I am working on the card game of war challenge where each player is given a
single card and the highest value wins. I keep getting a Type Error since
for the moment since the values of the cards cannot be compared due to their
types. I am thinking of creating a Card_Value class that will give each
"Vincent Balmori" wrote
I keep getting a Type Error since for the moment since the
values of the cards cannot be compared due to their
types.
Please send the complete error text sincethat will tell us
where to look etc.
I am thinking of creating a Card_Value class that will give each
rank
a
Just some programming philosophy.
On Fri, Jun 24, 2011 at 3:58 AM, Vincent Balmori
wrote:
>
> "Your whole approach is very fragile in this respect, it only
> takes one small mistake in the data to wreck your program,.
> Somethjing like a config file format would be much more
> robust (and readabl
It would be cool if their where decorators that modified decorators. I know
its possible, but I can't think of a use.
On Thu, Jun 23, 2011 at 11:05 PM, Steven D'Aprano wrote:
> Robert wrote:
>
>> Is there a good tutorial out there somewhere about decorators? Google
>> doesn't bring up much.
>>
>>
I have been working on another challenge that involves improving the
Blackjack program so the players can wager an amount. If a player loses they
will be removed from the game. I keep getting the error: “NameError: global
name 'bet' is not defined.” I know I came across this error before in a
pre
I was using glob and shutil to copy logs from one location to another
successfully, however, I have run into a snag when trying to copy a directory.
Not sure how to fix this.
Current Code is as follows:
for file in glob.glob("/drbd1/monitorcenter/Apps/WEB-INF/*"): #This line is
holding up
What's step 4?
On Sat, Jun 25, 2011 at 10:08 AM, Mac Ryan wrote:
> On Sat, 25 Jun 2011 06:18:14 -0700 (PDT)
> Adam Carr wrote:
>
> > Good Morning:
> >
> > I am very new to Python but I am enjoying the learning process. I
> > have a question about the application of Python to a problem at the
>
dude, what are all those story comments, did you just edit the mad
lib program from Python for Absolute Beginners?
On Wed, Jun 29, 2011 at 12:28 AM, David Merrick wrote:
> # Guess My Number GUI
> # Create a story based on user input
>
> from tkinter import *
> import random
> class Application(Fr
/myfiles/my_db/ needs to be a string
that right there is trying to divide nothing by the variable called myfiles,
divided by my_db, divide by nothing
On Mon, Jun 27, 2011 at 3:45 PM, wrote:
> I am trying to write a script that will dump a mysql db and then zip the
> file.
>
>
> I do know about m
I would go with __cmp__ which covers them all. 1 for greater, 0 for equal,
-1 for less than.
On Thu, Jun 30, 2011 at 5:35 AM, Alan Gauld wrote:
>
> "Vincent Balmori" wrote
>
>> I keep getting a Type Error since for the moment since the
>> values of the cards cannot be compared due to their
>> ty
>I keep getting the error: “NameError: global
>name 'bet' is not defined.” I know I came across this error before in a
>previous thread, but I am confused on how to solve this, since I am also
>trying to juggle it with inherited methods at the same time.
Telling us this without the stack trace is
-Original Message-
From: tutor-bounces+ramit.prasad=jpmchase@python.org
[mailto:tutor-bounces+ramit.prasad=jpmchase@python.org] On Behalf Of
gagnr...@verizon.net
Sent: Thursday, June 30, 2011 1:03 PM
To: tutor@python.org
Subject: [Tutor] Copying Files
I was using glob and shutil
I may be wrong but I thought __cmp__ was deprecated.
In fact I thought it was one oof the things removed in
Python v3
But I may have just imagined it! :-)
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/
From: Christopher Ki
Christopher King wrote:
I would go with __cmp__ which covers them all. 1 for greater, 0 for equal,
-1 for less than.
So-called "rich comparisons" using __lt__, __gt__, etc. have been
preferred since Python 2.1. The major advantage of them is that they can
be used for more complicated data ty
14 matches
Mail list logo