Question
Out of a classroom of students, you need to figure out which student has the most improvement between their lowest test score and highest test
Out of a classroom of students, you need to figure out which student has the most improvement between their lowest test score and highest test score. Given an array of objects containing a students name and test score in chronological order, create a function that will output the most improvement made by an individual student. You can assume all students names are unique.
-Remember the highest test score must come after the lowest test score to be considered an improvement
-A test score can be any integer number its not always between 0-100
-Make sure you try to design a solution that will be as time-efficient as possible
Example
Input:
students = [Mary, Steve, Steve, Mary, Steve]
scores = [19, 70, 99, 80, 100]
Output: 61
Explanation: Mary's lowest test score was 19, followed by an 80 later on in the year. This means her improvement was 61. Steve's highest improvement was 70 -> 100, which is only an improvement of 30.
# # Complete the 'calculateMostImprovement' function below. # # The function is expected to return an INTEGER. # The function accepts following parameters: # 1. STRING_ARRAY students # 2. INTEGER_ARRAY scores #
def calculateMostImprovement(students, scores): # Write your code here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started