Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a function called \'findHighest() \' that will find and return the highest

ID: 3852688 • Letter: W

Question

Write a function called 'findHighest() ' that will find and return the highest grade in the list called 'grades' in the following program. You can assume that the list has already been properly initialized. The number of elements in the list is determined by the constant called 'SIZE'. import random SIZE = 1 theta def display(grades): for i in range (theta, SIZE, 1): print(grades [i]) def initialize(grades): for i in range (theta, SIZE, 1): grades.append(random.randrange(1, 1 theta 1)) def findHighest (grades): # Write your answer here # End answer space return(highest) def start(): grades = [] initialize(grades) display(grades) highest = findHighest(grades) print('highest', highest) start()

Explanation / Answer

The answer is as follows:

The code for findhighest is as follows:

def findHighest(gardes):
    highest = 0;
    for i in range(0,SIZE,1):
        if grades[i] > highest:
           highest = grades[i]

    return highest

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote