Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

AP CSP Question of the Day Jan. 22, 2025

Reference
  1. Incorrect Correct No Answer was selected Invalid Answer

    What will be the value of numList after the following code segment is executed?

    numList ? [ 1, 0, 1, 0, 0, 1]
    index ? 1
    REPEAT UNTIL (index = LENGTH(numList))
    {
        IF (numList[index] MOD 2 = 0)
        {
            REMOVE(numList, index)
        }
        index ? index + 1
    }