Write a PYTHON program to create an array of size 10. Write a function to read v
ID: 3910005 • Letter: W
Question
Write a PYTHON program to create an array of size 10. Write a function to read values into this array. Write a function to display the values of this array. Write a function to find the max value of this array and returns that value to main. Write a function to find the minimum value of the array and return that value to main. Write a function to find the average value (in double) of this array and return that to the main. Display the difference between max and average and also the difference between min and average in the main program.
Explanation / Answer
def maximum(lst): max_val = None for num in lst: if max_val is None or num > max_val: max_val = num return max_val def minimum(lst): min_val = None for num in lst: if min_val is None or numRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.