Skip to content

Instantly share code, notes, and snippets.

@RamiAwar
Created October 2, 2021 17:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save RamiAwar/51085e75a44bdae7a1aadc7126ca949c to your computer and use it in GitHub Desktop.
def post_exam_computation(exam_id): # Requires exam_id
exam_results = db.get(exam_id) # Requires mocking db
max_score = max(exam_results) # Need exam results
min_score = min(exam_results)
exam_stats = {"max": max_score, "min": min_score}
db.save(exam_stats) # Requires mocking db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment