Section II practice: Shopping cart budget
Answer the four prompts about the program below, as you would about your own Create task on exam day. 60 minutes. Short, specific answers that point to the code score best.
Describe one input to this program and explain how the program uses that input to produce its output.
It names an input and an output but does not explain how the program turns one into the other.
Explain what would happen if the statement i ← i + 1 were moved out of the ELSE block so that it runs on every pass of the loop.
It does not explain the effect of REMOVE on the indexes, so it misses the real problem, the skipped element.
Describe two calls to removeOver that would cause different code segments in the procedure to execute. For each call, give the arguments and state which segment runs.
The arguments are not specific and the answer does not say which code segment each call executes.
Explain how the procedure removeOver helps manage the complexity of the program.
It is too general. It does not explain how the parameters and the single definition reduce complexity in this program.
Your Section II estimate
Frequently asked questions
How should I use this page?
Read the program and its PPR, press Start for a 60-minute timer like the exam, and answer the four prompts. Then press Finish to check your answers against the checklists and the sample answers.
Can I use my own Create task code?
The prompts are written for the sample PPR on this page, but you can practice the same questions on your own program: answer them about your procedure and your list, then check your answers with the same checklists.
Written by CodeUtility in the style of the exam; not College Board questions. AP is a trademark registered by the College Board, which is not affiliated with, and does not endorse, this site.