Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the code fragment (assumed to be in a program in which all variables ar

ID: 3909687 • Letter: C

Question

Consider the code fragment (assumed to be in a program in which all variables are legally defined): # program gets num1 and num2 from user, and values received # are always non-zero ints between 1 and +100 (code not shown) # compute precise quotient: answer float (num1 // num2) The programmer made a mistake and accidentally used int division, //, rather than float division. /. Still, we wonder the following: After the assignment statement the variable answer, will hold the the correct answer as expected by the programmer (despite his/her error), accurate to several digits to the right of the decimal point. OALWAYS, regardless of what values num1 and num 2 hold (as long as they are in the stated range) SOMETIMES, i.e., for some, but not all, values of num1 and num 2 NEVER, regardless of what values num1 and num 2 hold.

Explanation / Answer

Always , regardless of what values num1 and num2 hold(As long as they are in the stated range)