Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started