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.

0 words
Program design, function and purpose

Describe one input to this program and explain how the program uses that input to produce its output.

Algorithm development

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.

Errors and testing

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.

Data and procedural abstraction

Explain how the procedure removeOver helps manage the complexity of the program.

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.