Question
a. [10] A student is asked to write a function that will take a list containing values of relative humidity (a percentage between 0
a. [10] A student is asked to write a function that will take a list containing values of relative humidity (a percentage between 0 and 100) and return the lowest value. She wrote the function below, along with the test code with an example list: def badmin (mylist) min = 0 for i in range (len (mylist)): if mylist[i] < min: min = mylist[i] return min print (badmin([64, 53, 86]) Unfortunately, the program did not print the actual minimum of the example list which is 53 i) What will this program actually print? ii) Please correct the code so that it reports the correct minimum value. You can simply state any line(s) to be added/corrected/removed.
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 StartedRecommended Textbook for
Chemistry
Authors: Raymond Chang
10th edition
77274318, 978-0077274313
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App