5. Computing the average


#1


When i try to submit my code the site lowkey 'crashes' and send me message: 'Something went wrong :frowning: .
Click Close to try again or refresh the page.

i Tried another exercise and it works fine. Is it because of my code ? I'm using chrome and i tried with firefox and the result is same. I have tried multiple times but it won't work.


grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

def grades_sum(grades):
    total = 0
    for num in grades:
        total += num
    return total
    

def grades_average(grades):
    määrä = float(len(grades))
    summa = grades_sum(grades)
    total = summa / määrä
    return total

print grades_average(grades)


#2

määrä, i wouldn't use the ä, programming languages might have difficulty with them


#3

Thanks! I never have used 'äöå' before while coding but now i got some kind of brainfart.


#5