On Tue, Apr 16, 2013 at 6:09 PM, Dave Angel wrote:
> If the conversion itself will catch the errors, then you can just use
> try/catch to make such errors more polite to your users. That's the case if
> they enter "charlie" when you're asking for a salary value. But if they
> were to put 7.500
On 04/16/2013 05:46 PM, Jim Mooney wrote:
Further question. If I round the input right at the beginning,
round(paid,2) does that mean I still have the original error from
using .76 even before math, or does the rounding kill it? I would
guess not if it's binary,
You guess right. round() funct
Further question. If I round the input right at the beginning,
round(paid,2) does that mean I still have the original error from
using .76 even before math, or does the rounding kill it? I would
guess not if it's binary, although Python must have a way to handle
money amounts. I'm only on Chapter
On 04/16/2013 01:48 PM, Jim Mooney wrote:
I accidentally sent as HTML so this is a resend in case that choked
the mailing prog ;')
I was doing a simple training prog to figure monetary change, and
wanted to avoid computer inaccuracy by using only two-decimal input
and not using division or mod w
On 04/16/2013 07:48 PM, Jim Mooney wrote:
> I accidentally sent as HTML so this is a resend in case that choked
> the mailing prog ;')
>
> I was doing a simple training prog to figure monetary change, and
> wanted to avoid computer inaccuracy by using only two-decimal input
> and not using divisio
On Apr 16, 2013, at 1:48 PM, Jim Mooney wrote:
> I accidentally sent as HTML so this is a resend in case that choked
> the mailing prog ;')
>
> I was doing a simple training prog to figure monetary change, and
> wanted to avoid computer inaccuracy by using only two-decimal input
> and not using
On Tue, Apr 16, 2013 at 1:48 PM, Jim Mooney wrote:
> I accidentally sent as HTML so this is a resend in case that choked
> the mailing prog ;')
>
> I was doing a simple training prog to figure monetary change, and
> wanted to avoid computer inaccuracy by using only two-decimal input
> and not usin
I accidentally sent as HTML so this is a resend in case that choked
the mailing prog ;')
I was doing a simple training prog to figure monetary change, and
wanted to avoid computer inaccuracy by using only two-decimal input
and not using division or mod where it would cause error. Yet, on a
simple
Is this a SM forum ?
Karim
On 01/31/2011 04:05 PM, David Hutto wrote:
On Mon, Jan 31, 2011 at 8:11 AM, Elwin Estle wrote:
...but I have an excuse. I had the thing saved in a drafts folder and just hit
send without thinking about it.
...I'll just go super glue broken glass to my hands and
--- On Mon, 1/31/11, David Hutto wrote:
> From: David Hutto
> Subject: Re: [Tutor] oops...sorry, just top posted again
> To: "Elwin Estle"
> Cc: tutor@python.org
> Date: Monday, January 31, 2011, 10:05 AM
> On Mon, Jan 31, 2011 at 8:11 AM,
> Elwin Estle
>
On Mon, Jan 31, 2011 at 8:11 AM, Elwin Estle wrote:
> ...but I have an excuse. I had the thing saved in a drafts folder and just
> hit send without thinking about it.
>
> ...I'll just go super glue broken glass to my hands and sprinkle itching
> powder all over my body. Is that penance enough?
...but I have an excuse. I had the thing saved in a drafts folder and just hit
send without thinking about it.
...I'll just go super glue broken glass to my hands and sprinkle itching powder
all over my body. Is that penance enough?
___
Tuto
"sudhanshu gautam" wrote
are there any Links by which I can get good knowledge in OOPS .
Try the cetus links web site.
Also google and wikipedia will throw up lots of sites.
I want to go with good problems in OOPS so tell me any good
book or link of oops concepts
My OOP topic lists 3 b
are there any Links by which I can get good knowledge in OOPS .
I want to go with good problems in OOPS so tell ,me any good book or link of
oops concepts
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
hi, and welcome to Python! my comments below...
> I made a class with the name student that prints simply name of the student
> as well as his roll_no also, pasting code here .
sounds pretty straightforward
> class student:
> def __init__(self,name,roll_no):
> self.name=name
>
I am reading python since last 15 days ,read some basics of python , Last
night was reading about the OOPS concepts ,but getting some problems , going
to discuss with you people.
MY CODE :
I made a class with the name student that prints simply name of the student
as well as his roll_no also,
I guess this is homework so I will keep my comments fairly general.
You have a lot of tests on count. Are they all needed?
The code might be clearer if tuition was a positive number.
newPrincipal and newTuition could have better names
I don't think you need so many variables, balance, newBalance a
Forget the first, this is the corrected version.
Thanks,
Pat# Problem Set 1
# Name P Wethington
# Collaborators :None
# Time #1:00
# This is a program intended to compute the number of students who will benefit from a grant, also what
# amount the last student will receive.
principal =
On 18/12/2007, Jim Morcombe <[EMAIL PROTECTED]> wrote:
> Now, if I take int(string) the code will work, except it crashes out when
> the data is null.
>
> student.row = int(student.row)
> ValueError: invalid literal for int() with base 10: ''
>
> What is the easiest and recomended way of turning th
I solved my last problem. The data was string data and of course '1' is > 5.
Now, if I take int(string) the code will work, except it crashes out when the
data is null.
student.row = int(student.row)
ValueError: invalid literal for int() with base 10: ''
What is the easiest and recomended w
On Wed, Apr 19, 2006 at 09:10:41PM +0530, Kaushal Shriyan ([EMAIL PROTECTED])
wrote:
> Thanks Matthew
> Just wanted to know
> x.count('l') -> 2 Here 2 means what I didnot understood this
> and also does x is a object and capitalize(), swapcase() and
> count('l') are methods, is that correct what
On 4/19/06, Matthew White <[EMAIL PROTECTED]> wrote:
> Even though I am still new to python, I've recently had an insight as
> to what makes OOP different from procedural programming.
>
> Let's take perl for example. A variable in perl is like a bowl. It's an
> empty vessel you can put things in.
Even though I am still new to python, I've recently had an insight as
to what makes OOP different from procedural programming.
Let's take perl for example. A variable in perl is like a bowl. It's an
empty vessel you can put things in. You can change the contents of
the bowl, you can empty the b
Hi All
I wanted to understand about OOPs Concept in Python in a easy way,
Please explain me with an example
I have been reading http://www.freenetpages.co.uk/hp/alan.gauld/tutclass.htm
but at the moment still the concept is not clear
Thanks in Advance
Regards
Kaushal
__
Sorry about that last post! I thought I was replying to a Komodo list post.
-- t.
==
Tom Cloyd
Bellingham, Washington, U.S.A: (360) 920-1226
<< BestMindHealth.com >>
==
Using Opera's revolutio
sorry way off heh...
i think i'll sleep and try later.
__
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
___
Tutor maillist - Tutor
26 matches
Mail list logo