Skip to content

Instantly share code, notes, and snippets.

@RamiAwar
Created October 2, 2021 17:36
Show Gist options
  • Save RamiAwar/d08fc2130e688102a536b6506696af6d to your computer and use it in GitHub Desktop.
Save RamiAwar/d08fc2130e688102a536b6506696af6d to your computer and use it in GitHub Desktop.
def post_exam_computation(exam_id):
exam_results = db.get(exam_id) # Database call
max_score = max(exam_results)
min_score = min(exam_results)
exam_stats = {"max": max_score, "min": min_score}
db.save(exam_stats)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment