Question: in python pls Write a function range_result(stud_id, results) that accepts as input a student ID and a table of study results of various students and
in python pls
Write a function range_result(stud_id, results) that accepts as input a student ID and a table of study results of various students and units and that returns as output the range of grades of the student across all his/her units (i.e, the difference between the minimum and maximum grade). The input table is expected to contain three columns: unit, student id, grade. For example: >>> results = [['Database', 101028, 65], ['Database', 101022, 80), ['Operating Systems', 201028, 61], ['Operating Systems', 201022, 59), ['Java Fundamentals', 310666, 45], ['Java Fundamentals', 101022, 85), ['Mathematics', 101022, 71], ['Mathematics', 493968, 67), ['Information Systems', 523123, 75]] >>> range result (101022, results) 14. >>> range_result(101028, results) 0 No imports are allowed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
