Answered step by step
Verified Expert Solution
Link Copied!

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

=====================================

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

rackspace is a web hosting company. that means that if

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago