A practical, evidence-based checklist for AP CSP Create PT success.
If the user did nothing, the program would behave differently or not work.
// INPUT: data comes from the userlet response = prompt("Type yes or no").toLowerCase();// LIST: stores multiple related valueslet answers = [];
answers.push("yes");answers.push("no");The procedure does not need to be called more than once.
// STUDENT-DEVELOPED PROCEDURE with a PARAMETERfunction analyzeAnswers(answerList){ let score = 0; return score;}If your procedure has more than one line that executes top-to-bottom, you have sequencing.
if statement.All three must appear inside the same student-developed procedure.
// ALGORITHM inside the procedurefunction analyzeAnswers(answerList){ let score = 0; let i = 0;
// ITERATION while (i < answerList.length) { // SELECTION if (answerList[i] === "yes") { score++; }
i++; }
return score;}// OUTPUT depends on processingconsole.log("Yes count:", result);