-
-
Save RamiAwar/27b457302205f4c45a5b9f5128142abf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calculate_stats(exam_results): | |
max_score = max(exam_results) | |
min_score = min(exam_results) | |
return {"max": max_score, "min": min_score} | |
def post_exam_computation(exam_id): | |
exam_results = db.get(exam_id) | |
exam_stats = calculate_stats(exam_results) | |
db.save(exam_stats) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment