Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

A Find Highest Python Programming Overview Utilize a function to find and return the highest value in a list. Requirements • main function o Create “constants” where MIN holds -100, MAX holds 100, and...

1 answer below »
A
Find Highest Python Programming
Overview
Utilize a function to find and return the highest value in a list.

Requirements
• main function
o Create “constants” where MIN holds -100, MAX holds 100, and LIST_SIZE holds 10
o Create an empty list named scores
o Fill scores with LIST_SIZE random integers in the range [MIN, MAX]. Utilize the append method to fill the list.
o Display the list. Either use a loop or a single print statement.
o Display the highest number in the a
ay: This number will be returned by findHighest.
• findHighest function
o Note: The max function would typically be used in Python. However, to gain practice with looping and if
statements, max may not be used. This will also prepare you for future courses if continuing in computer
programming.
o Accepts a list as a parameter. You may assume the list has at least one integer.
o Set the initial highest value to be the first integer in the list. Then loop through the rest to determine the
highest integer value.
o Return the highest value
o Write function header documentation in the proper format. Use the following guide and replace the angle
ackets according to your function
##
# @param
# @precondition contains at least one value.
# @return • The only remaining documentation required is your name as the author in the program header documentation.
A description of the program is not required.
Sample Runs
Run 1
[-100, 88, -2, -97, 1, -82, -6, -84, -70, -36]
Highest value: 88
Run 2
[-14, -36, 14, 41, -79, 15, -42, -86, -72, -7]
Highest value: 41

Submission
• Before class: Print and upload the .py file.
• Beginning of class: Hand in the .py file.
Answered Same Day Aug 18, 2021

Solution

Mohit answered on Aug 19 2021
150 Votes
#!/us
in/env python
# coding: utf-8
# In[18]:
import random
def findHighest(scores_list): # This function requires list as input and calculate the highest value

if len(scores_list) == 0: # precondion checking - if list size is not zero
return -1

...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here