2. Refer to your Personalized Project Reference when answering this question.
Consider the first iteration statement appearing in the Procedure section of your Personalized Project Reference. Identify the specific number of times the body of this iteration statement executes. Describe a condition that would prevent the loop from terminating, resulting in an infinite loop. If the current code cannot result in an infinite loop, explain a modification to the loop structure that would cause one.
Consider the procedure identified in part (i) of the Procedure section of your Personalized Project Reference. Suppose another programmer makes a change to the code inside this procedure. Describe a specific modification that would result in a logic error. Explain specifically how the behavior of the procedure would differ from the intended behavior as a result of this error.
Consider the list identified in the List section of your Personalized Project Reference. Suppose you are provided with a procedure called isEqual(value1, value2) that returns true if value1 and value2 are equal in value and returns false otherwise. Write a detailed description of an algorithm that uses isEqual to count the number of times a specific value appears in your list. Your description must be detailed enough that another programmer could implement the algorithm.
Your Program Code
For the AP CSP Create Performance Task, you need to submit your program code along with your written responses. Generate sample code to practice with, or paste your own code here.
00:00