Re: [Tutor] oops - resending as plain text

2013-04-16 Thread eryksun
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

Re: [Tutor] oops - resending as plain text

2013-04-16 Thread Dave Angel
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

Re: [Tutor] oops - resending as plain text

2013-04-16 Thread Jim Mooney
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

Re: [Tutor] oops - resending as plain text

2013-04-16 Thread Dave Angel
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

Re: [Tutor] oops - resending as plain text

2013-04-16 Thread Sander Sweers
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

Re: [Tutor] oops - resending as plain text

2013-04-16 Thread Don Jennings
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

Re: [Tutor] oops - resending as plain text

2013-04-16 Thread Joel Goldstick
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

[Tutor] oops - resending as plain text

2013-04-16 Thread Jim Mooney
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

Re: [Tutor] oops...sorry, just top posted again

2011-01-31 Thread Karim
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

Re: [Tutor] oops...sorry, just top posted again

2011-01-31 Thread Elwin Estle
--- 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 >

Re: [Tutor] oops...sorry, just top posted again

2011-01-31 Thread David Hutto
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?

[Tutor] oops...sorry, just top posted again

2011-01-31 Thread Elwin Estle
...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

Re: [Tutor] oops concepts

2009-04-14 Thread Alan Gauld
"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

[Tutor] oops concepts

2009-04-14 Thread sudhanshu gautam
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

Re: [Tutor] OOPS Problem

2009-04-13 Thread wesley chun
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 >    

[Tutor] OOPS Problem

2009-04-13 Thread sudhanshu gautam
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,

Re: [Tutor] Oops! I just corrected my file:RE Completed project is this correct?

2009-02-08 Thread Kent Johnson
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

[Tutor] Oops! I just corrected my file:RE Completed project is this correct?

2009-02-07 Thread cclpianos
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 =

Re: [Tutor] Oops:

2007-12-17 Thread John Fouhy
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

[Tutor] Oops:

2007-12-17 Thread Jim Morcombe
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

Re: [Tutor] OOPs Concept

2006-04-19 Thread Matthew White
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

Re: [Tutor] OOPs Concept

2006-04-19 Thread Kaushal Shriyan
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.

Re: [Tutor] OOPs Concept

2006-04-19 Thread Matthew White
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

[Tutor] OOPs Concept

2006-04-19 Thread Kaushal Shriyan
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 __

[Tutor] oops!

2005-05-28 Thread Tom Cloyd
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

[Tutor] oops.

2005-02-03 Thread alieks laouhe
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