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
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 =
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
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
"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
"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
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
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