View Single Post
Old Nov 23rd, 2006, 6:34 PM   #7
purpleorange
Newbie
 
purpleorange's Avatar
 
Join Date: Oct 2006
Location: Oh gosh, where I live. This is all so sudden.
Posts: 7
Rep Power: 0 purpleorange is on a distinguished road
Send a message via AIM to purpleorange
Seems like no one wants to answer your question. So will be the first. =) Yes, I know how to code a function that does that.

Since you show the ability to find the average of numbers yourself, I assume that the previous people that replied were correct in saying that this is a homework problem.

Here are some clues if you are still stuck:
1. The average, as you probably know, is the sum of all the elements of the list divided by the length of the list.
2. A way of accessing the elements in the list is by using a 'for' loop.
3. The len() method will return the length of the list.
purpleorange is offline   Reply With Quote