Write a python program that creates an array with pre-assigned random values of your choice. The number of elements should be at least 6 elements. Your program should display or print the largest/highest element, smallest /lowest element, and the total or sum of all elements. For example, if your array has the following values 4, 2, 5, 6, 121, 1, 7, -10 The program's output will be: The largest/highest value = 121 The smallest/lowest value = -10 The total of all elements = 136 Take note that your program should work correctly, regardless of the values in your array and regardless of how many elements are there in the array. Also, do not use the min(), max() and sum() built-in functions of Python for this assignment.
Write a python program that creates an array with pre-assigned random values of your choice. The number of elements should be at least 6 elements. Your program should display or print the largest/highest element, smallest /lowest element, and the total or sum of all elements.
For example, if your array has the following values 4, 2, 5, 6, 121, 1, 7, -10
The program's output will be:
The largest/highest value = 121
The smallest/lowest value = -10
The total of all elements = 136
Take note that your program should work correctly, regardless of the values in your array and regardless of how many elements are there in the array. Also, do not use the min(), max() and sum() built-in functions of Python for this assignment.
Step by step
Solved in 4 steps with 2 images