QUESTION 4 This is a MULTIPLE ANSWER question, which means you are able to select one or more answers as being correct. Note that this does not necessarily mean that there are multiple correct...


QUESTION 4<br>This is a MULTIPLE ANSWER question, which means you are able to select one or more answers as being correct. Note that this does not necessarily mean that there are multiple correct answers. In any case, select all the answers you<br>believe are correct. (NB: There are no part marks awarded for multiple answer questions.)<br>There is a non-empty Python list of integers called numbera whose values are all in the range -maxaize to maxaize, inclusive. The following piece of code causes the SMALLEST value in list numbers to be stored in the<br>variable answer:<br>best - maxsize t a very large integer<br>for number in numbers:<br>if number < best:<br>best = number<br>answer - best<br>Which of the following options causes the LARGEST value in numbers to be stored in variable answer?<br>best - maxsize<br>for number in numbers:<br>if best > number:<br>t a very large integer<br>best = number<br>answer = best<br>+ a very small integer<br>best - -maxsize<br>for number in numbers:<br>if best < number:<br>best - number<br>answer = best<br>best = -maxsize<br>+ a very small integer<br>for number in numbers:<br>if number > best:<br>best = number<br>answer= best<br>best = -maxsize<br>* a very small integer<br>for number in numbers:<br>if best > number:<br>best - number<br>answer best<br>

Extracted text: QUESTION 4 This is a MULTIPLE ANSWER question, which means you are able to select one or more answers as being correct. Note that this does not necessarily mean that there are multiple correct answers. In any case, select all the answers you believe are correct. (NB: There are no part marks awarded for multiple answer questions.) There is a non-empty Python list of integers called numbera whose values are all in the range -maxaize to maxaize, inclusive. The following piece of code causes the SMALLEST value in list numbers to be stored in the variable answer: best - maxsize t a very large integer for number in numbers: if number < best:="" best="number" answer="" -="" best="" which="" of="" the="" following="" options="" causes="" the="" largest="" value="" in="" numbers="" to="" be="" stored="" in="" variable="" answer?="" best="" -="" maxsize="" for="" number="" in="" numbers:="" if="" best=""> number: t a very large integer best = number answer = best + a very small integer best - -maxsize for number in numbers: if best < number:="" best="" -="" number="" answer="best" best="-maxsize" +="" a="" very="" small="" integer="" for="" number="" in="" numbers:="" if="" number=""> best: best = number answer= best best = -maxsize * a very small integer for number in numbers: if best > number: best - number answer best

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here