Sorry. Here is the entire Error stack if this can help.
Traceback (most recent call last):
File
"/Users/vincentbalmori/Desktop/Python/py3e_source/chapter09/blackjackbetting.py",
line 240, in
main()
File
"/Users/vincentbalmori/Desktop/Python/py3e_source/chapter09/blackjackbetting.py",
lin
Here is the other one that occurs when I lose
Traceback (most recent call last):
File
"/Users/vincentbalmori/Desktop/Python/py3e_source/chapter09/blackjackbetting.py",
line 240, in
main()
File
"/Users/vincentbalmori/Desktop/Python/py3e_source/chapter09/blackjackbetting.py",
line 236, in
On Fri, Jul 1, 2011 at 9:29 AM, Vincent Balmori wrote:
>
> Here is the other one that occurs when I lose
>
> Traceback (most recent call last):
> File
>
> "/Users/vincentbalmori/Desktop/Python/py3e_source/chapter09/blackjackbetting.py",
> line 240, in
>main()
> File
>
> "/Users/vincentbalmo
Is there a way to limit raw_input to the hundredth decimal point?
For example, I'd like to allow the user to enter 5.75 but not 5.756:
dollars = raw_input("Please enter a dollar amount: $")
Thanks!
___
Tutor maillist - Tutor@python.org
To unsubscribe
I am supposed to be looking at scripts on-line, reading them and making sure
that I understand them. I think taht most of teh things I can't make more
than a guess at, are modules taht I don't know, and I can mostly make them
out. But the unpaired double quotation mark, " , in the following ha
On Friday 01 July 2011 10:15:08 Lisi wrote:
> I am supposed to be looking at scripts on-line, reading them and making
> sure that I understand them. I think taht most of teh things I can't make
> more than a guess at, are modules taht I don't know, and I can mostly make
> them out. But the unpair
Greetings Lisi,
: I am supposed to be looking at scripts on-line, reading them and
: making sure that I understand them.
When you see an example that you don't understand, consider trying
to do something similar in an interactive Python interpreter. This
is a simple way to learn in Python
You can use a regular expression or plain simple len()
2011/7/1 Ryan Kirk
> Is there a way to limit raw_input to the hundredth decimal point?
>
> For example, I'd like to allow the user to enter 5.75 but not 5.756:
>
> dollars = raw_input("Please enter a dollar amount: $")
>
> Thanks!
>
On 2011/07/01 09:30 AM, Ryan Kirk wrote:
Is there a way to limit raw_input to the hundredth decimal point?
For example, I'd like to allow the user to enter 5.75 but not 5.756:
dollars = raw_input("Please enter a dollar amount: $")
Thanks!
___
Tutor m
Zubin Mithra wrote:
Hey everyone,
I was running 2to3 on a particular file and I got the following traceback(
http://paste.pocoo.org/show/223468/).
For short amounts of text, such as a traceback, please don't use a paste
bin, just copy it into your post.
Some people are reading mail at a tim
Steven D'Aprano wrote:
Zubin Mithra wrote:
Hey everyone,
I was running 2to3 on a particular file and I got the following
traceback(
http://paste.pocoo.org/show/223468/).
For short amounts of text, such as a traceback, please don't use a paste
bin, just copy it into your post.
*blinks*
Ryan Kirk wrote:
Is there a way to limit raw_input to the hundredth decimal point?
No. raw_input is a tool that does one thing: it collects input from the
user. It doesn't understand numbers, check for decimal places, check the
input for spelling errors, or anything else. It's a hammer, not a
On 7/1/2011 12:51 AM Andre Engels said...
In this case, the error message says:
NameError: global name 'bet' is not defined
Note use of the term global?
That means, at some time at the program, it is told to do something with
'bet', but there is no variable bet. And when does that happen?
Lisi wrote:
I am supposed to be looking at scripts on-line, reading them and making sure
that I understand them. I think taht most of teh things I can't make more
than a guess at, are modules taht I don't know, and I can mostly make them
out. But the unpaired double quotation mark, " , in the
On Friday 01 July 2011 14:26:07 Steven D'Aprano wrote:
> If they look the same to you, then you need to increase your font size,
> change to a programmers font, or possible clean your glasses :)
Thanks for the reply, Steven.
Suggestions for "a programmers font" gratefully received. I do have p
Sorry, I haven't upgraded to 3 yet.
On Thursday, June 30, 2011, Steven D'Aprano wrote:
> 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
On Friday 01 July 2011 14:05:22 Steven D'Aprano wrote:
> Oh my, that's hilarious.
>
> Sorry folks, nothing to see here... I accidentally clicked on an unread
> email from 2010 (!!!) and thought it had just come in.
I'm glad that my eyes hadn't mislead me that much!! I was trying to find the
orig
Christopher King wrote:
Sorry, I haven't upgraded to 3 yet.
No need to apologise for that! Python 2.7 will be around a long time yet.
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.pytho
Lisi wrote:
On Friday 01 July 2011 14:26:07 Steven D'Aprano wrote:
If they look the same to you, then you need to increase your font size,
change to a programmers font, or possible clean your glasses :)
Thanks for the reply, Steven.
Suggestions for "a programmers font" gratefully received.
"Lisi" wrote
Suggestions for "a programmers font" gratefully received.
I generally use Courier.
Its ugly and old fashioned but it clearly shows
the differences between i,l, | and 1 and '' and "
and between ' and ` etc.
and spaces are big enough to "see" clearly. :-)
But I could copy a
Excerpts from Alan Gauld's message of Fri Jul 01 13:03:40 -0400 2011:
>
> "Lisi" wrote
>
> > Suggestions for "a programmers font" gratefully received.
>
> I generally use Courier.
>
> Its ugly and old fashioned but it clearly shows
> the differences between i,l, | and 1 and '' and "
> and
On 01-Jul-11 10:56, Corey Richardson wrote:
Excerpts from Alan Gauld's message of Fri Jul 01 13:03:40 -0400 2011:
I use and love inconsolata[0], it's a great font for programming,
and looks great as well (both on screen and off).
I like inconsolata and Envy Code R, although just to be weird I t
Thank you all for such a lot of very helpful replies. I have been looking
through the recommended fonts and am pleasantly surprised by how clear,
legible and well differentiated some of them are.
I have been using Bitstream Vera Sans Mono in KWrite, which gives me all the
colours and spacing a
I was able to get the program started without errors now. What is left now is
to:
Having the stash change after winning and losing. No matter what, the value
in stash stays the same. The conditional statement I made which prevents
players with no money from playing is dependent on this.
After e
Also I must be doing something wrong if I have to enter a "bet = Bet()" into
each function where it is used. I tried putting Bet into the other classes'
arguments but it did not have any effect.
Emile van Sebille wrote:
>
> On 7/1/2011 12:51 AM Andre Engels said...
>
>> In this case, the error
# Blackjack
# From 1 to 7 players compete against a dealer
import cards, games
class BJ_Card(cards.Card):
""" A Blackjack Card. """
ACE_VALUE = 1
@property
def value(self):
if self.is_face_up:
v = BJ_Card.RANKS.index(self.rank) + 1
if v > 10:
26 matches
Mail list logo