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,

 Consider the code fragment (assumed to be in a program in

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!