[Python-Help] (fwd)

Paul Rubin http
Sun Dec 5 00:56:27 EST 2004


"Alfred Canoy" <alred at guam.net> 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 numbers
>       c.. Finds the mode of a list of numbers
> 
> 
> Can you please give me clue how I should start solving the following problem
> below? Here's the source code that I did so far:

Looks like your computation of the average (mean) is ok.

To find the median and mode, the simplest approach is to learn about
arrays (also called lists) in Python.  Python arrays support various
built-in operations, and you'll want to be sure to read about those,
since some of them may be able to save you some work.

Good luck!



More information about the Python-list mailing list