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 »
Dummy


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 array: 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 brackets 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 3 days AfterJul 20, 2021

Answer To: A Find Highest Python Programming Overview Utilize a function to find and return the highest value...

Love answered on Jul 23 2021
142 Votes
Introduction to assignment:
Utilize a function to find and return the highest value in a list.
Requirements specificat
ions of assignment:
· main function
1. Create “constants” where MIN holds -100, MAX holds 100, and LIST_SIZE holds 10
2. Create an empty list named scores
3. Fill scores with LIST_SIZE random integers in the range [MIN, MAX]. Utilize the append method to fill the list.
4. Display the list. Either use a loop or a single print statement.
5. Display the highest number in the array: This number will be returned by findHighest.
· findHighest function
1. Accepts a list as a parameter. You may assume the list has at least one integer.
2. Set the initial highest value to be the first integer in the list. Then loop through the rest to determine the highest integer value.
3. Return the highest value
4. Write function header documentation in the proper format.
Source Code :
# importing rangrange from random to get a random value from a range of values
from random import randrange
#main fundtion defination
def main():
# declaring a MIN constant with value -100
MIN = -100
# declaring a MAX constant with value 100
MAX = 100
# declaring a...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here