Re: [Python-Help] (fwd)

2004-12-05 Thread Steven Bethard
Craig Ringer wrote: It looks to me like you'd be better off reading each input number into a list. You may also find it useful to write a generator function to read your values in: >>> def read_numbers(): ... while True: ... number = int(raw_input('Enter a number: ')) ... if n

Re: [Python-Help] (fwd)

2004-12-05 Thread Steven Bethard
Craig Ringer wrote: As you can see, it's much easier to work with data in lists. Some of the other methods, like list.sort() and list "slices" will also be useful to you, but I'll let you figure out the details ;-) . Something else that might be useful to you if you're using Python 2.4: >>> lst =

Re: [Python-Help] (fwd)

2004-12-05 Thread Bob Gailer
At 10:07 PM 12/4/2004, Alfred Canoy wrote: Hello, I'm just new to programming and would like to ask for help.. Build a module that contains three functions that do the following: a.. Compute the average of a list of numbers b.. Finds the statistical median value of a list of numbers The m

Re: [Python-Help] (fwd)

2004-12-05 Thread Craig Ringer
On Sun, 2004-12-05 at 13:07, Alfred Canoy wrote: > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of numbers > c.. Finds the mode of a list of numbers > > count = 0 > sum = 0 > number = 1 > > print 'Enter 0 to exit the loop' > w

Re: [Python-Help] (fwd)

2004-12-04 Thread Joe Raul
"Alfred Canoy" <[EMAIL PROTECTED]> news:[EMAIL PROTECTED] > Hello, > > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical

Re: [Python-Help] (fwd)

2004-12-04 Thread Paul Rubin
"Alfred Canoy" <[EMAIL PROTECTED]> writes: > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of num

RE: [Python-Help] (fwd)

2004-12-04 Thread Robert Brewer
Alfred Canoy wrote: > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of numbers > c.. Finds

Re: [Python-Help] (fwd)

2004-12-04 Thread Alfred Canoy
Hello, I'm just new to programming and would like to ask for help.. Build a module that contains three functions that do the following: a.. Compute the average of a list of numbers b.. Finds the statistical median value of a list of numbers c.. Finds the mode of a list of numbers Can