Student becomes the teacher-part of a whole


def average(numbers):
    total = sum(numbers)
    total = float(total)/ len(numbers)
    return total
def get_average(student):
    homework = average(student["homework"])
    quizzes = average(student["quizzes"])
    tests = average(student["tests"])
    return 0.1 * homework+ 0.3 * quizzes +  0.6 *tests
def get_letter_grade(score):
    if score >= 90:
        return "A"
    elif score >= 80:
        return "B"
    elif score >= 70:
        return "C"
 elif score >= 60:
        return "D"
        return "F"

print get_letter_grade(get_average(lloyd))
def get_class_average(students):

error : File "python", line 43
def get_class_average(students):
IndentationError: expected an indented block. How do i solve it.


If you find out the difference between the two images, You probably find your solution.
More read:
I am Indentation ,Read about me!


Thanks by the way, problem solved.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.