### Thread: A Quick Average Function

1. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Feb 2013
Posts
1
Rep Power
0

#### A Quick Average Function

Hello forum members!

I'm new to Python and new to these forums, but looking forward to learning from you all.

I've got a problem I'm seeking some help with answering... and the problem is:

Implement function avg() that takes as input a list that contains lists of numbers. Each number list represents the grades a particular student received for a course. For example, here is an input list for a class of four students: [[95, 92, 86, 87], [66, 54], [89, 72, 100], [33, 0, 0]]

The function avg should print, one per line, every student's average grade. You may assume that every list of grades is nonempty, but you may not assume that every student has the same number of grades.

Your help is much appreciated! I'm not looking for someone to answer the question for me, just some guidance as far as where to begin... Thanks.
2. No Profile Picture
Contributing User
Devshed Newbie (0 - 499 posts)

Join Date
Nov 2012
Posts
43
Rep Power
6
I know this is for class and I probably shouldn't answer this, but what your teacher doesn't know won't hurt them!

This is a pretty simple function.

Code:
```def avg(grades):
avg=0.
```student  average