On Jan 20, 11:03 pm, Chris Angelico ros...@gmail.com wrote:
On Sat, Jan 21, 2012 at 1:23 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 20 Jan 2012 16:21:30 -0800, Rick Johnson wrote:
Your variable names need a bit more thought
def average(bin):
What is a bin?
On Jan 20, 9:23 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
On Fri, 20 Jan 2012 16:21:30 -0800, Rick Johnson wrote:
On Jan 20, 12:49 pm, Tamanna Sultana tamannas.rah...@gmail.com wrote:
If you can give me some lead to fix the code I wrote below that will
be great:
Le 20/01/12 20:30, Vincent Vande Vyvre a crit:
Le 20/01/12 19:49, Tamanna Sultana a crit:
can some one help me??
I would like to create a function that, given a bin, which is a list
(example below), generates averages for the
can some one help me??
I would like to create a function that, given a bin, which is a list
(example below), generates averages for the numbers separated by a
string 'end'. I am expecting to have 4 averages from the above bin,
since there are 4 sets of numbers separated by 4 'end' strings
Le 20/01/12 19:49, Tamanna Sultana a crit:
can some one help me??
I would like to create a function that, given a bin, which is a list
(example below), generates averages for the numbers separated by a
string 'end'. I am expecting to have 4 averages from the
On 1/20/2012 1:49 PM, Tamanna Sultana wrote:
can some one help me??
I would like to create a function that, given a bin, which is a list
(example below), generates averages for the numbers separated by a
string 'end'. I am expecting to have 4 averages from the above bin,
since there are 4 sets
On 01/20/12 13:46, Terry Reedy wrote:
def average(bin):
num=[]
total = 0.0
count=0
for number in bin:
if number!='end':
total += float(number)
count+=1
else:
num.append(total/count)
total = 0.0
On 1/20/2012 2:46 PM, Terry Reedy wrote:
On 1/20/2012 1:49 PM, Tamanna Sultana wrote:
can some one help me??
I would like to create a function that, given a bin, which is a list
(example below), generates averages for the numbers separated by a
string 'end'. I am expecting to have 4 averages
On Jan 20, 12:49 pm, Tamanna Sultana tamannas.rah...@gmail.com
wrote:
If you can give me some lead to fix the code I wrote below that will be
great:
Your variable names need a bit more thought
def average(bin):
What is a bin? Maybe you shoulc have called this a lst eh?
num=[]
Why
On Jan 20, 9:26 pm, Terry Reedy tjre...@udel.edu wrote:
On 1/20/2012 2:46 PM, Terry Reedy wrote:
On 1/20/2012 1:49 PM, Tamanna Sultana wrote:
can some one help me??
I would like to create a function that, given a bin, which is a list
(example below), generates averages for the
On Fri, 20 Jan 2012 16:21:30 -0800, Rick Johnson wrote:
On Jan 20, 12:49 pm, Tamanna Sultana tamannas.rah...@gmail.com wrote:
If you can give me some lead to fix the code I wrote below that will
be great:
Your variable names need a bit more thought
def average(bin):
What is a bin?
On Sat, Jan 21, 2012 at 1:23 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Fri, 20 Jan 2012 16:21:30 -0800, Rick Johnson wrote:
Your variable names need a bit more thought
def average(bin):
What is a bin? Maybe you shoulc have called this a lst eh?
Bin is a standard
12 matches
Mail list logo