Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread Marc Tompkins
On Sun, Mar 6, 2011 at 11:27 PM, nookasree ponamala wrote: > Thanks a lot Marc. This works now. > > Sree. > > Glad to hear it. Welcome to the list, by the way. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http:/

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread nookasree ponamala
Thanks a lot Marc. This works now.   Sree. --- On Mon, 3/7/11, Marc Tompkins wrote: From: Marc Tompkins Subject: Re: [Tutor] calculate the sum of a variable - python To: "nookasree ponamala" Cc: "Wayne Werner" , tutor@python.org Date: Monday, March 7, 2011, 10:54 AM On

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread Marc Tompkins
On Sun, Mar 6, 2011 at 8:46 PM, nookasree ponamala wrote: > Thanks for the reply Wayne, but still it is not working, > > when I used int It throws the below error: > File "", line 2, in > File "", line 3, in summary > File "", line 3, in > ValueError: invalid literal for int() with base 10

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread Wayne Werner
On Sun, Mar 6, 2011 at 10:46 PM, nookasree ponamala wrote: > Thanks for the reply Wayne, but still it is not working, > > when I used int It throws the below error: > File "", line 2, in > File "", line 3, in summary > File "", line 3, in > ValueError: invalid literal for int() with base 1

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread nookasree ponamala
loat and the error is: Traceback (most recent call last):   File "", line 2, in   File "", line 3, in summary   File "", line 3, in ValueError: invalid literal for float(): '   Thanks, Sree. --- On Mon, 3/7/11, Wayne Werner wrote: From: Wayne Werner Subje

Re: [Tutor] calculate the sum of a variable - python

2011-03-06 Thread Wayne Werner
On Sun, Mar 6, 2011 at 9:31 PM, nookasree ponamala wrote: > Hi : > > I'm a Senior SAS Analyst. I'm trying to learn Python. I would appreciate if > anybody could help me with this. It works fine if I give input instead of > reading a text file. I don't understand where I'm going wrong. > > I'm try

[Tutor] calculate the sum of a variable - python

2011-03-06 Thread nookasree ponamala
Hi : I'm a Senior SAS Analyst. I'm trying to learn Python. I would appreciate if anybody could help me with this. It works fine if I give input instead of reading a text file. I don't understand where I'm going wrong. I'm trying to read a text file and find out the following: 1. Sum of amt for