AP · thinka 原創模擬試題

2025 AP AP Computer Science Principles 模擬試題連答案詳解

Thinka May 2025 AP-Style Mock — AP Computer Science Principles

6 60 分鐘2025
An original Thinka practice paper modelled on the structure and difficulty of the May 2025 AP AP Computer Science Principles paper. Not affiliated with or reproduced from AP.

部分 Create Performance Task Artifacts

Submit video demonstrating program input, functionality, and output, along with student-developed code meeting list, procedure, selection, and iteration criteria.
2 題目 · 2
題目 1 · free-response
1
### Course Project: Video Demonstration

Submit a video recording (maximum 1 minute) that demonstrates the running execution of your student-developed computer program.

Your video demonstration must clearly exhibit each of the following:
1. Input: At least one instance of input being supplied to the program (e.g., user keyboard entry, touch/mouse interaction, sensor data, or loaded dataset).
2. Program Functionality: The execution of the program's core features or computational processing.
3. Output: At least one observable output produced in response to the input (e.g., screen display change, textual/numerical result, audible sound, or graphical animation).

(Note: The recording must depict the live running software. Static screenshots, mockups, code walkthroughs without execution, or storyboards are not acceptable.)
查看答案詳解

解題

To earn the point for the Video component of the Create Performance Task, the student must submit a continuous video recording (not exceeding 60 seconds) demonstrating:
- An observable input being received (such as selecting options from a menu, typing in a text field, or clicking a button/canvas).
- The active running behavior and functionality of the program as it processes that input.
- The resulting output generated by the program (such as updated scoreboards, dynamic visuals, modified interface elements, or displayed calculations).

評分準則

Scoring Criteria (0–1 points):
Award 1 point if the video demonstrates the running of the program including all of the following:
- Input (demonstrates the program receiving data, mouse clicks, keystrokes, or automated input).
- Program functionality (demonstrates at least one operational aspect/feature of the program during execution).
- Output (demonstrates the visual, textual, or auditory result produced by the program execution).

Decision Rules:
- Consider the video demonstration (and the program code if necessary to verify the source of input).
- Do NOT award the point if:
- The video does not show a demonstration of the program actively running (e.g., only static screenshots, slides, or diagrams are shown).
- The video only displays static source code without running execution.
- The video fails to demonstrate any input or any produced output.
題目 2 · free_response
1
A student submits the following code segment representing a student-developed procedure as part of their Personalized Project Reference:

```text
PROCEDURE findHighScorers(scoreList, threshold)
{
highScorersCount ← 0
FOR EACH score IN scoreList
{
IF(score ≥ threshold)
{
highScorersCount ← highScorersCount + 1
}
}
RETURN highScorersCount
}
```

Explain how this procedure meets the AP Computer Science Principles Create Performance Task program requirements for algorithm complexity. In your response, explicitly identify the algorithm components (selection and iteration) present in the procedure and state how each is used.
查看答案詳解

解題

To earn the point, the response must correctly identify and explain both algorithm components:
1. Iteration: Identifies the loop construct `FOR EACH score IN scoreList` and explains that it iterates through each item in the list parameter `scoreList`.
2. Selection: Identifies the conditional construct `IF(score ≥ threshold)` and explains that it evaluates whether the current score meets or exceeds the required threshold value.
Together, these components demonstrate a non-trivial algorithm utilizing sequencing, selection, and iteration to count matching entries in a data collection.

評分準則

Award 1 mark if the response includes all of the following criteria:
- Correctly identifies the iteration component (`FOR EACH` loop) and explains its role (traversing/looping over `scoreList`).
- Correctly identifies the selection statement (`IF(score ≥ threshold)`) and explains its role (checking if a score meets the cutoff criteria).

Do NOT award credit if:
- The response fails to identify either selection or iteration.
- The explanation refers to built-in handlers without referencing the student-developed procedure logic.
- The explanation is vague, inaccurate, or describes selection/iteration as trivial.

準備好測試自己了嗎?

將這些筆記轉化為考試練習。獲取此課題的無限量AI題目,即時批改及詳細解析。

練習此課題

部分 II: Written Response Prompts

Respond to four written prompts on exam day referring to the Personalized Project Reference (PPR) within 60 minutes.
4 題目 · 4
題目 1 · Short Written Response
1
Identify one user input to your program. Explain how your program processes this input to help achieve the overall purpose of your program.
查看答案詳解

解題

To earn the point, the response must demonstrate both of the following:
1. Identify a plausible and specific user input to the program (e.g., mouse click, text entry, touch event, or sensor input).
2. Explain how the program processes that input (what code actions or computations occur) and connect that processing directly to the overall purpose/goal of the program.

Key Aspects for a High-Scoring Response:
- Specific Input Identified: A clear description of the input method and data value (e.g., entering a numerical budget amount or selecting an option from a drop-down menu).
- Processing Explanation: Describing the sequence of operations triggered by the input (e.g., storing into a list, performing a calculation, updating UI elements).
- Connection to Purpose: Explicitly stating the problem being solved or creative goal fulfilled by processing this specific data.

評分準則

Scoring Criteria (0–1 points):

Award 1 point if the written response:
- Identifies a valid input to the program.
- Explains how the program processes this input and relates this processing to the overall purpose of the program.

Decision Rules:
- Consider the response in relation to the submitted video and program code.
- Either a specific data example or a general description of the input mechanism is acceptable.
- If multiple inputs are mentioned, credit is awarded if at least one input and its connection to the purpose are described accurately.

Do NOT award credit if:
- The identified input is implausible, inaccurate, or inconsistent with the program functionality.
- The response states what the input is without explaining how the program processes it or how it relates to the program's purpose.
- The stated purpose does not reflect the problem solved or creative goal pursued by the program.
題目 2 · short_answer
1
Refer to the Procedure section of your Personalized Project Reference when responding to this prompt.

Locate the conditional statement in your student-developed procedure that controls an alternative branch of execution.
- State the relational or logical condition utilized in this conditional statement.
- Provide a concrete argument or set of input arguments that causes this condition to evaluate to `true`.
- Explain the precise step-by-step logic that results in the condition evaluating to `true` for the input values you specified.
查看答案詳解

解題

### Exemplar Response Based on Sample Code:

Sample Procedure Segment:
```python
def evaluate_discount(member_level, total_cost):
if member_level == "Platinum" and total_cost >= 100.0:
discount_rate = 0.20
else:
discount_rate = 0.05
return total_cost * (1 - discount_rate)
```

Response Formulation:
1. Boolean Expression:
The condition utilized in this conditional statement is `member_level == "Platinum" and total_cost >= 100.0`.

2. Test Values:
A set of values that causes this condition to evaluate to `true` is `member_level = "Platinum"` and `total_cost = 150.0`.

3. Explanation of Evaluation:
When the procedure executes with these values:
- The left operand `member_level == "Platinum"` evaluates to `true` because the string argument `"Platinum"` exactly matches the literal `"Platinum"`.
- The right operand `total_cost >= 100.0` evaluates to `true` because the numerical value `150.0` is greater than or equal to `100.0`.
- The logical operator `and` requires both relational sub-expressions to be `true` for the overall expression to be `true`. Since both conditions are satisfied, the compound Boolean expression evaluates to `true`.

評分準則

### Scoring Criteria (0–1 point)

Award 1 point if the written response:
- Identifies the specific Boolean condition from the conditional statement within the procedure from the Personalized Project Reference.
- Identifies a plausible, specific input value or set of values that will cause this identified Boolean expression to evaluate to `true`.
- Explains why the specified value(s) cause the Boolean expression to evaluate to `true` based on the relational and/or logical operators used in the expression.

Do NOT award the point if any of the following is true:
- The procedure does not contain a conditional statement.
- The identified condition does not match the code in the Personalized Project Reference.
- Generic, abstract, or missing values are provided instead of specific test values.
- The explanation merely restates that the condition is `true` without explaining how the operators evaluate the given values.
- The response contains logic or explanations that are contradictory or inconsistent with the provided code.
題目 3 · short-answer
1
Refer to your Personalized Project Reference when answering this question.

Consider the procedure included in part (i) of the Procedure section of your Personalized Project Reference. Suppose a collaborator edits the statements within this procedure. Describe a specific code modification that would introduce a logic error into this procedure. Explain why this modification causes a logic error and describe how the procedure's output or execution behavior changes as a result.
查看答案詳解

解題

### Sample High-Scoring Response (Illustrative Practice Example)

Program Procedure Context:
```python
def calculate_discount(price, is_member):
if is_member and price >= 50:
discount = price * 0.20
elif price >= 100:
discount = price * 0.10
else:
discount = 0
return price - discount
```

Modification:
"A collaborator could change the relational operator in the first conditional statement from `price >= 50` to `price > 50`."

Explanation of Logic Error & Behavior Change:
"This modification results in a logic error because when a member purchases an item costing exactly $50, the first condition `is_member and price > 50` evaluates to `False` instead of `True`. As a result, the code skips the intended 20% discount ($10 off, resulting in $40) and falls through to the `else` block (since $50 is also not `>= 100`), returning the full price of $50 with $0 discount. The program runs to completion without crashing, but calculates and outputs an incorrect final price for qualifying boundary cases."

評分準則

Scoring Criteria (1 Point Total):

Award 1 point if the written response demonstrates BOTH of the following:
1. Describes a specific, plausible modification to the code inside the student-developed procedure identified in part (i) of the Procedure section of the Personalized Project Reference.
2. Explains why this modification causes a logic error AND describes how the procedure's behavior or output changes unexpectedly as a result.

Decision Rules / Acceptable Conventions:
- The modification may involve modifying existing code, deleting code, or inserting new instructions.
- A logic error causes the program/procedure to produce unexpected behavior or incorrect results while still running, or causes an unexpected runtime crash due to invalid logic (e.g., index out of range or infinite loop).

Do NOT award credit if:
- The response describes a syntax error (e.g., missing a bracket/colon) that simply prevents the code from compiling/interpreting.
- The response merely states that the procedure 'will not work' or 'breaks' without providing a specific explanation of the logical cause and altered behavior.
- The response refers to code outside part (i) of the Procedure section.
題目 4 · free_response
1
Refer to your Personalized Project Reference when answering this question.

Consider the procedure identified in part (i) of the Procedure section of your Personalized Project Reference.

• Describe the specific functionality provided by this procedure.
• Explain how implementing this functionality as a procedure manages complexity in your program code compared to if the code statements were written out directly wherever the functionality is needed.
查看答案詳解

解題

To earn the point, the response must meet both criteria:
1. Functionality of Procedure: Clearly describe what the procedure in part (i) of the Procedure section does when executed (e.g., 'The procedure `calculateFinalScore(attempts, timeBonus)` iterates through the player's recorded attempts, filters out penalty points, adds the calculated time bonus based on the remaining time parameter, and returns the total updated score.').
2. Managing Complexity / Procedural Abstraction: Explain how encapsulating this functionality inside a procedure manages complexity in the program rather than repeating the statements in-line (e.g., 'Creating this procedure manages complexity because the score calculation algorithm contains multiple loops and conditional checks that need to execute after each mini-game round. By defining it as a reusable procedure with parameters, the program eliminates over 40 lines of duplicate code across three different levels, making the overall codebase significantly easier to debug, test independently, and update if scoring rules change.').

評分準則

Scoring Criteria (1 Point Total)

The written response:
- Describes the functionality provided by the identified procedure in part (i) of the Procedure section of the Personalized Project Reference.
- Explains how implementing this functionality as a procedure manages complexity in the program code compared to not implementing it as a procedure (e.g., reduces redundancy, simplifies maintenance, isolates functionality for testing, or allows code reuse with different parameters).

Decision Rules:
- If multiple procedures are included in part (i), use the procedure referenced in the response (or the first procedure if none is specified).
- The parameter(s) can be explicit or implicit.

Do NOT award credit if any of the following is true:
- A procedure is not included in part (i) of the Procedure section of the Personalized Project Reference.
- The response does not apply to the procedure in part (i).
- The response describes the functionality of the entire program rather than the specific procedure.
- The explanation of managing complexity focuses on user experience/app gameplay rather than program code maintainability, organization, or redundancy reduction.
- The explanation is implausible, inaccurate, or inconsistent with the provided code.

想知道自己有幾分把握?

thinka 是 DSE 學生用的 AI 練習應用程式,有無限量練習題、即時自動批改和詳細解題步驟。逾 100,000 名學生用它確認自己真的識,而不只是「以為識」。

想練更多類似題型?在 thinka 無限量操練,即時知道答案。

免費開始練習