Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Test Correction 2018 • 2 min read

Description

Correction for the practice test frq 2018

  • Question 12
  • Question 29
  • Question 6

    Screenshot 2023-11-04 at 12 29 59 PM

    Answer is E

    Collegeboard Explanation:

    To determine the positive distance between two values, we need to take the absolute value of the difference using Math.abs. Additionally, we need to check to see if the positive difference is less than or equal to the tolerance instead of greater than or equal to the tolerance.

    Question 12

    Screenshot 2023-11-04 at 12 32 06 PM

    Answer is C

    Collegeboard Explanation:

    Incorrect. This would be the return value if k was incremented by 1 instead of 2 and the loop condition was changed to k < input.length()- 1.

    Question 29

    Screenshot 2023-11-04 at 12 33 23 PM

    Answer is E

    Collegeboard Explanation:

    Incorrect. This prints the remainder of each value from 1 to 100 when divided by 4. It will print 1 % 4, which is 1, then 2 % 4, which is 2, then 3 % 4, which is 3, then 4 % 4, which is 0, then it will repeat this pattern printing 1, 2, 3, 0 until k is greater than 100.