AP · thinka 原创模拟试题

2024 AP AP Computer Science Principles 模拟试题及答案详解

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

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

部分 Create Performance Task: Portfolio Components

Submit program code, personalized project reference, and a video demonstrating program input, functionality, and output.
2 题目 · 2
题目 1 · free-response
1
Submit a video demonstration (up to 1 minute in length) illustrating the execution of your program.

Your video must demonstrate the running of your program, including:
- Input given to the program
- Program functionality in response to the input
- Output produced by the program
查看答案详解

解题

To earn the point for the Video component, the submission must be an actual recording of the program running (not a slideshow, static storyboard, or series of screenshots). The video must visibly demonstrate:
1. Input: User interaction or data entry (such as clicking a button, selecting a dropdown item, entering text into a prompt box, or receiving sensor/data file inputs).
2. Program Functionality: At least one clear aspect of the program executing its algorithm or processing the supplied input.
3. Output: The visual, audible, or textual result generated and displayed to the user or device as a consequence of the execution.

评分标准

Award 1 point if the video demonstrates the running of the program including:
- Input
- Program functionality
- Output

Decision Rules / Guidance:
- Consider the video (or Program Code if necessary to clarify the source of input) when scoring this point.
- The video needs to show at least one example of the program's functionality.

Do NOT award credit if:
- The video does not show a demonstration of the program running (e.g., screenshots or storyboards are submitted instead of a screen recording/video).
- The video fails to demonstrate input, program functionality, or output.
题目 2 · Program Code Requirements
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.

(a) Identify the name and parameter(s) of the procedure.

(b) Describe how the procedure uses both selection and iteration to accomplish its purpose in the program.
查看答案详解

解题

To earn the point, the response must:
1. Identify the procedure name and its explicit parameter(s) as shown in the Personalized Project Reference.
2. Accurately describe what the iteration structure does (e.g., traverses a list or repeats a specific calculation for a set range) and how the selection statement (e.g., an `if` or `if/else` block) evaluates a condition inside or alongside the loop to alter the flow of execution or process elements conditionally.

评分标准

Award 1 point if the written response meets both of the following criteria:
- Explicitly identifies the student-developed procedure name and its parameter(s).
- Explains the specific role and operation of both the selection statement and the iteration statement within the procedure body to accomplish the program's intended goal.

Do NOT award the point if:
- The procedure does not contain both selection and iteration.
- The description merely lists lines of code without explaining the algorithm's functionality.
- The parameters identified are arguments or global variables rather than formal parameters defined in the procedure header.

准备好测试自己了吗?

将这些笔记转化为考试练习。获取此课题的无限AI题目,即时批改及详细解析。

练习此课题

部分 II: Written Response Prompts

Using your Personalized Project Reference sheet, answer the four written response prompts covering program design, algorithm development, errors/testing, and abstraction.
4 题目 · 4
题目 1 · free_response
1
Identify the overall purpose of your program. Explain how a specific visual or textual output produced by your program directly supports this purpose for the user.
查看答案详解

解题

### Sample Exemplar Response:

Program Purpose:
"The purpose of my program is to assist high school track-and-field athletes in calculating and monitoring their split times to help them optimize their pacing strategies for long-distance events."

Explanation of Output:
"When the athlete inputs their total target time and number of laps, the program outputs a formatted table listing the target split time for each individual lap along with a visual color-coded indicator (green for on pace, yellow for slight deviation, red for major deviation) based on their recorded practice times. This textual and visual output directly supports the program's purpose by immediately giving the runner clear, actionable feedback on which segments of their race need pacing adjustments."

(Note: Student responses will vary depending on their individual Create task project.)

评分标准

### Scoring Criteria (0–1 point)

Award 1 point if the written response:
- Identifies the overall purpose of the program (i.e., the problem being solved or creative interest being pursued).
- Explains how a specific visual or textual output produced by the program supports the identified purpose.

Decision Rules:
- Consider the Video (or Program Code if necessary) and Written Response 1 when scoring this point.
- The response must distinguish between the purpose of the program (why it exists / the goal for the user) and the functionality of the program (how it executes / code-level actions).
- The identified output can be graphical, auditory, numerical, or textual.

Do NOT award a point if any of the following is true:
- The response describes program functionality instead of the broader purpose.
- The output described is not produced by the program or is implausible/inconsistent with the program.
- The response fails to connect the identified output to how it helps achieve the stated purpose.
题目 2 · free-response
1
Refer to your Personalized Project Reference when answering this question.

Consider the first conditional statement included in the Procedure section of your Personalized Project Reference.

Identify the Boolean condition used in this conditional statement and explain what action or process the procedure performs when this Boolean condition evaluates to `true`.
查看答案详解

解题

To earn the point, the response must:
1. Identify the Boolean expression of the first conditional statement in the Procedure section (e.g., `userScore >= targetScore`).
2. Provide an accurate general description of what the procedure accomplishes or how the program state updates when that Boolean expression evaluates to `true` (e.g., incrementing the level counter, displaying a victory message to the user, and updating the leaderboard list).

评分标准

Award 1 mark if the written response:
- Identifies the Boolean expression within the first conditional statement located in the Procedure section of the Personalized Project Reference.
- Accurately describes what occurs during program execution when the identified Boolean expression evaluates to `true`.

Do NOT award the mark if:
- No conditional statement is present in the Procedure section of the Personalized Project Reference.
- The description of the Boolean expression does not match the student's code.
- The response merely recites or copies lines of code word-for-word without providing a meaningful description of functionality.
- The described functionality is implausible, incorrect, or contradictory to the provided code.
题目 3 · 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.

Identify two distinct test cases for your procedure that test different execution paths or conditions within the algorithm. For each test case:
- State the specific argument value(s) passed in the procedure call.
- Describe the expected outcome or result (such as a return value, screen update, or variable modification).

If your procedure does not have multiple execution paths or cannot produce different outcomes, explain why two such test cases are not possible for your procedure.
查看答案详解

解题

Sample Complete Response:

Test Case 1:
- Procedure Call / Argument(s): `calculateDiscount(120, "VIP")`
- Expected Outcome: The conditional check `if membership == "VIP"` evaluates to true, applying a 20% discount. The procedure returns `96.0` and updates the display text to show the discounted price of $96.00.

Test Case 2:
- Procedure Call / Argument(s): `calculateDiscount(120, "REGULAR")`
- Expected Outcome: The conditional check for VIP is false, executing the `else` branch which applies a standard 5% discount. The procedure returns `114.0` and updates the display text to show the price of $114.00.

Alternative Scenario (Single Path):
If the procedure simply calculates a mathematical transformation without any selection (e.g., `calculateArea(length, width)` which returns `length * width`), the student explains: "The procedure performs only sequential multiplication without conditional statements, meaning all calls execute the exact same sequence of statements regardless of the arguments passed."

评分标准

Award 1 point if the written response demonstrates ALL of the following criteria:
1. Identifies two calls to the student-developed procedure with specific argument values (or sets of values) that cause different code segments/branches to execute.
2. Accurately describes the expected output, return value, or observable behavior for each call.
OR
Explains clearly and accurately why it is not possible to write two calls that execute different code paths based on the structure of the procedure in the Personalized Project Reference.

Do NOT award credit if:
- The response describes calls to two different procedures rather than two calls to the same procedure.
- Arguments provided do not match the parameters defined in the procedure header.
- The described expected outcomes are inaccurate, implausible, or inconsistent with the provided code.
题目 4 · free_response
1
Refer to your Personalized Project Reference when answering this question.

Consider the list identified in the List section of your Personalized Project Reference.

(i) Identify the name of your list and describe the type or meaning of the data elements stored within it.

(ii) Explain how using this list manages complexity in your program compared to an alternative implementation that does not utilize a list or collection data structure. Your explanation must specifically describe how your program code would have to be written differently without using the list.
查看答案详解

解题

Sample Complete Response:

(i) The list in my program is named `highScoresList`, which stores integer values representing the top scores achieved by players across multiple game rounds.

(ii) Using `highScoresList` manages complexity by allowing a single variable to store an arbitrary number of scores and enabling automated traversal using loops. Without this list, my program would require separate individual variables for each score (e.g., `score1`, `score2`, `score3`, etc.). Furthermore, operations such as finding the maximum score or displaying rankings would require extensive, repetitive chains of conditional statements (`if-else`) rather than a concise iteration statement over the list. This would make the program significantly longer, harder to read, error-prone to maintain, and incapable of dynamically handling varying amounts of score entries.

评分标准

Award 1 point for a written response that meets ALL of the following criteria:
• Identifies the list name and accurately describes the data stored in the list.
• Explains how the list manages complexity in the program by contrasting it with a plausible alternative implementation without a list (e.g., requiring multiple individual variables, repetitive conditional code, difficulty in maintenance, or inability to scale dynamically).

Do NOT award the point if any of the following is true:
• The list is not identified or is not present in the List section of the Personalized Project Reference.
• The explanation confuses data abstraction (lists) with procedural abstraction (procedures/functions) without addressing how the list itself manages complexity.
• The response provides only vague or generic statements (e.g., 'it makes my code shorter') without specifically describing what the code would look like without the list.

想知道自己有几分把握?

thinka 是 DSE 学生在用的 AI 练习应用,提供无限量练习题、即时自动批改和详细解题步骤。超过 100,000 名学生用它确认自己是真的会,而不只是「以为会」。

想练更多同类题型?在 thinka 无限量刷题,即时知道答案。

免费开始练习