Question: Fill in the Blanks The following program reads 10 random integer numbers into a list and sends the list to a function. The function finds
Fill in the Blanks
The following program reads 10 random integer numbers into a list and sends the list to a function. The function finds the smallest element in the list and returns it back to where it was called.
=====================================
Sample Run
List: [79, 75, 80, 52, 45, 17, 13, 88, 89, 50]
Smallest element in the list is: 13
=====================================

from random import randint def main (): my_list = [] for i in range (10): number = randint (1, 100) ### Add numbers to the list print ("List:", my_list) value = ### Call smallest_element function print ("Smallest element in the list is:", def smallest_element (my_list): smallest = my_list[0] for i in range (1, len(my_list)): if smallest = my_list[i] return main ()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
