I am doing this exercise and I am wondering why sometimes I get indentation issues. In the code below, you see two functions, in the fist one, def average, the indentation is shorter than in def get_average. When I tried to run def get_average with the same indentation as def average, I got a syntax error (marked after quizzes=average(student[“quizzes”]) ), but when changed it to 4 spaces, it worked; whereas def average works without any issues with that indentation.
Basically, I just don’t understand why the different indentation levels for both functions.
# Add your function below! def average(numbers): total=float(sum(numbers)) return total/len(numbers) 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