AP
®
Computer Science Principles 2023 Scoring Commentary
© 2023 College Board.
Visit College Board on the web: collegeboard.org.
Create Performance Task (continued)
Row 3:
The response earned the point for this row, meeting both criteria:
• The response includes code that uses a list to manage complexity by storing nine ways that
the user might say yes. The list manages complexity by allowing the program to use “in” to
check if a given string is a valid way of saying “yes,” instead of hard-coding the acceptable
“yes” values in one or more conditional statements or storing them in separate variables.
• The response explains how the code would be more complex without the list. The response
states, “I could have assigned a variable for each yes possibility, which would require an if-
statement for each variable to check for equivalency to the user’s answer.”
Row 4:
The response earned the point for this row, meeting both criteria:
• The response includes a student-developed procedure, point_calc, with one parameter,
input, that is used in the procedure. The response also includes four calls to this procedure
in a separate segment of code. (Only one call is needed to meet this criterion.)
• The response describes how the procedure contributes to the overall functionality of the
program. The response states, “The procedure, point_calc, adds to the overall
functionality because it is integral to output the personalized pet for the user” because
“point_calc is necessary to … determine the pet.” This last statement also describes what
the identified procedure does: it “calculate[s] points to determine the pet.”
Row 5:
The response did not earn the point for this row, meeting one of the two criteria:
• The student-developed algorithm within the procedure point_calc includes sequencing,
selection (if statement), and iteration (for loop). However, the use of iteration is trivial. The
response states, “In order to increase the range of numbers to determine each pet, I run
through the loop multiple times.” However, the same effect could have been achieved more
simply without the loop by adding 4, 8, 12, and 16 to the variable points in each of the if-
statements, respectively, instead of adding 1, 2, 3, and 4, respectively, four times.
• The response concisely explains how the algorithm in the procedure works with enough
detail that it can be recreated. The response states, “The procedure, point_calc, takes one
input as its parameter. It makes the existing variable, points, global. Then it evaluates
each if-statement four times (due to the “for in range (4)” loop) to see if it applies to the
argument. There are four if-statements each for if the argument equals A, B, C, or D. For
the one it applies to, the assigned number of points is added to 'points'. Each argument
will only apply to one of the if-statements, so when it repeats the other three loops the same
number of points will be added each time. There is no need for a return value because
'points' stores the total points.” This response describes its input and global variable, the
for loop, and what each of the if statements does. Although this description does not specify
how many points to add in each case, it is clear from the response what “the assigned
number of points” means.