Question: Which best describes the code below? import math answer = math.inf # answer is initialised to infinity # any number is smaller than infinity #
Which best describes the code below?
import math answer = math.inf # answer is initialised to infinity # any number is smaller than infinity # e.g. 5 < math.inf is True for k in range(0,len(var)): if var[k] < answer and var[k] >= bound1 and var[k] <= bound2: answer = var[k]
a. It finds the minimum of those list entries whose value is the closed interval [bound1,bound2]
b. It finds the maximum of those list entries whose value is the closed interval [bound1,bound2]
c. It finds the minimum of those list entries whose value is the closed interval [bound2,bound1]
d. It finds the maximum of those list entries whose value is the closed interval [bound2,bound1]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
