Section II practice: Comfortable days
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 the purpose of this program and explain how one of its outputs helps it achieve that purpose.
It describes the program's function, not its purpose, and it does not connect an output to a purpose.
Describe in detailed steps how the algorithm in countDaysInRange works, so that another programmer could write it without seeing your code.
The steps are not detailed enough to rebuild the algorithm, and the condition with both bounds is missing.
Suppose the condition were written t ≥ low OR t ≤ high by mistake. Describe a test case, with specific values, that would reveal the error, and explain why.
No specific values and no expected results; it does not show why the test reveals this error.
Suppose the program did not use the list weekTemps and stored the seven temperatures in seven separate variables instead. Explain how the code that finds the highest temperature would have to change.
True, but it does not explain how the code that finds the highest temperature changes or why the list manages complexity.
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.