Skip to content

Instantly share code, notes, and snippets.

@Restuta
Last active August 29, 2015 13:58
Show Gist options
  • Save Restuta/10404410 to your computer and use it in GitHub Desktop.
Save Restuta/10404410 to your computer and use it in GitHub Desktop.
For Helen
#Define a function calledget_class_average that has one argumentstudents. You can expect students to be a list containing your three students.
#First, make an empty list calledresults.
#For each student item in the classlist, calculate get_average(student) and then call results.append() with that result.
#Finally, return the result of callingaverage() with results.
def get_class_average(students):
results = {} //should be results = []
for item in students:
results.append(get_average(item))
return average(results)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment