Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

AP CSP Question of the Day Jan. 9, 2025

Reference
  1. Incorrect Correct No Answer was selected Invalid Answer

    A music festival is hosting a two day event. The list dayOne contains the names of the fans attending the festival on the first day and the list dayTwo contains the names of the fans attending the festival on the second day.

    Only fans who attend both festival dates are issued a two-day VIP pass. The ticket issuer wants to create vipList, which contains the names of the fans attending both festival dates.

    The following code segment is intended to create vipList, which is initially empty. It uses the procedure IsFound (list, name), which returns true if name is found in list and returns false otherwise.

    FOR EACH fan IN dayOne
    {
         <MISSING CODE>
    }
    

    Which of the following could replace <MISSING CODE> so that the code segment works as intended?