Hey so Im a beginner, and I need some help.
My professor gave us this code:
def average(list): total = 0.0 for number in list: total += number return total / len(list)
Then, he asked us to rewrite that program so that it uses a while loop instead.
I have no idea :/ Everything I've tried so far doesn't give me the right answer.
If you could please help me, I'd be forever grateful