8.9. AP CS Principles Exam Prep

8.9.1. Sample 1 - 2017’s Sample A

Row 1: Developing a Program with a Purpose (Video and Response 2A)

Requirements Score Explanation

A.) The video demonstrates the running of at least one feature of the program submitted.

AND

B.) The response (audio narration or written response) identifies the purpose of the program (what the program is attempting to do).

1

A.) The video is a continuous running of the program that demonstrates several features (i.e. log in, review, add entries) in under a minute.

AND

B.) The response (in this case the audio narration) matches the video and indicates that the purpose of the program is “to allow users to have an app where they can privately journal about their day”

Additional Explanation

The video and narration are well planned out and executed. It is simple and yet thoroughly explains the app. The two things to remember the difference between are purpose and function. Purpose is the intended goal or objective of the program. Function is how the program works.

Student Response


2a. Narration in video

Row 2: Developing a Program with a Purpose (Response 2B)

Requirements Score Explanation

Describes or outlines steps used in the incremental and iterative development process to create the entire program.

0

The response only describes the development at two specific points in time. The response lacks discussion of the overall development process of the app. A good response would describe the steps taken to develop the program including information about the testing, debugging, and refinement of the program once the initial code was written.

Additional Explanation

Students should focus on conveying the overall process of the app development. Clearly defining the start and finish of the process while touching on important milestones along the way is very important to this response.

Student Response

2b. Being unfamiliar with Firebase’s structure, I encountered a problem while programming when I tried to include a 3rd Firebase database. Upon the addition of the component and the corresponding coding elements, my app could no longer be packaged or loaded onto a device for testing. My app would always crash while loading. Unable to find a clear syntax error, I resolved the issue by debugging and deleting portions of the code until the app would finally successfully load and then reprogramming the deleted portions of code. Another difficulty I encountered was transferring variables across screens in order to access the correct user’s data. Opening a new screen in App Inventor would clear the values of the variable on the device, which would render them unusable on the next screen. I resolved this independently by assembling the contents of each screen into its own arrangement, and utilizing the .visible property of these arrangements to make them appear and disappear, providing the illusion of multiple screens and allowing the accessed variable values to be consistent across all “screens”.

Row 3: Developing a Program with a Purpose (Response 2B)

Requirements Score Explanation

A.) Specifically identifies at least two program development difficulties or opportunities.

AND

B.) Describes how the two identified difficulties or opportunities are resolved or incorporated.

1

A.) The response describes two program development difficulties/opportunities

AND

B.) explains how each was resolved.

The first difficulty is that when including a third Firebase database, the program could no longer be packaged or loaded onto a device for testing. This is resolved by deleting portions of the code until the app worked, and then adding back in the deleted portions.

The second difficulty is transferring variables across screens. This is resolved by using the visible property of these arrangements to make them appear and disappear, providing the illusions of multiple screens.

Additional Explanation

Students should explicitly label their opportunities or difficulties as done in this example. Adding the sentence structures “the first…” and “the second…” also makes it unmistakeable for the grader to identify. The way the student points out the resolution of the difficulties is spot-on by specifically using the phrase “I resolved”.

Student Response

2b. Being unfamiliar with Firebase’s structure, I encountered a problem while programming when I tried to include a 3rd Firebase database. Upon the addition of the component and the corresponding coding elements, my app could no longer be packaged or loaded onto a device for testing. My app would always crash while loading. Unable to find a clear syntax error, I resolved the issue by debugging and deleting portions of the code until the app would finally successfully load and then reprogramming the deleted portions of code. Another difficulty I encountered was transferring variables across screens in order to access the correct user’s data. Opening a new screen in App Inventor would clear the values of the variable on the device, which would render them unusable on the next screen. I resolved this independently by assembling the contents of each screen into its own arrangement, and utilizing the .visible property of these arrangements to make them appear and disappear, providing the illusion of multiple screens and allowing the accessed variable values to be consistent across all “screens”.

Row 4: Applying Algorithms (Response 2C)

Requirements Score Explanation

Selected code segment implements an algorithm.

Indicated by placing an oval around the specific piece of code in the entire program code section.

If using the template, a screenshot is provided directly with the response.

1

By the definition of an algorithm, the selected code segment does implement an algorithm.
The main algorithm pictured here is the AccountDB.GotValue block. For easy reference, the response also includes screenshots of two sub-algorithms (algorithms included in the main algorithm). In this case, both sub-algorithms are procedures.
The written response matches the selected code.

Additional Explanation

By providing a screenshot of the algorithm, the student simplified the process of identifying the algorithm. Students need to be very careful to select an algorithm that fills the requirements for both rows 5 and 6.

Student Response

2c.

Row 5: Applying Algorithms (Response 2C)

Requirements Score Explanation

A.) Selected code segment implements an algorithm that uses mathematical or logical concepts.

AND

B.) Explains how the selected algorithm functions

AND

C.) Describes what the selected algorithm does in relation to the overall program.

1

A.) The selected code segment in this case is the main algorithm - the AccountDB.GotValue block. It satisfies the math/logic requirement because it uses an If/Else statement with Boolean conditions which counts as logic.

AND

B.) The response explains how the algorithm functions by stating it “examines the tag and values sent back in order to properly redirect the program to either proceed with a login or create account procedure”.

AND

C.) The response describes what the algorithm does in relation to the overall purpose of the program (stores user data).

Additional Explanation

Students should take the time to explicitly describe the logical or mathematical concepts used in the design of the algorithm. This statement, “redirect the program to either proceed with a login or create account procedure.” talks about the selection process, but could put more emphasis on it being the logical part of the algorithm. Great use of the phrase “the algorithm examines” points out the function of it. To show the relation to overall program, this example uses another great sentence structure “...is an important algorithm as it handles...”

Student Response

2c. As my program uses Firebase databases to store user data, AccountDB.GotValue is an important algorithm as it handles all data retrieved from the account database such as users and passwords. Because Firebase data requests are handled asynchronously to the program, it is necessary that when data is sent back from Firebase, the algorithm examines the tag and values sent back in order to properly redirect the program to either proceed with a login or create account procedure.  One of the integrated algorithms is the procedure called loginProcedure (above). When called, the procedure loginProcedure will login in the user and load up the user’s diary entries if the correct password is entered. Otherwise, an error message will appear and the user will have to try again. The procedure createAccount shown above is another integrated algorithm that helps create a user’s account and mark the designated locations for the user’s data in Firebase given that they had provided a valid password and an unique username. The integration of the two procedures createAccount and loginProcedure helps the overall algorithm perform and regulate the core functions of the login screen of creating accounts and logging in.

Row 6: Applying Algorithms (Response 2C)

Requirements Score Explanation

• A.) Selected code segment implements an algorithm that includes at least two or more algorithms.

AND

• B.) At least one of the included algorithms uses mathematical or logical concepts.

AND

• C.) Explains how one of the included algorithms functions independently.

1

A.) The selected code segment includes two algorithms (loginProcedure and createAccount procedures) that are integrated to create a new main algorithm (account access).

AND

B.) Both of the included procedures contain If/Else statements with Boolean conditions which count as logical concepts to satisfy the math/logic requirement.

AND

C.) The response explains how the loginProcedure procedure functions (“login in the user and load up the user’s diary entries if the correct password is entered. Otherwise, an error message will appear and the user will have to try again.”)

Additional Explanation

The statement “One of the integrated algorithms…” is a great way to call attention to the requirements for this part of the scoring criteria. When it comes to the logical/mathematical concepts, this response leaves a lot to the imagination and only states “ load up the user’s diary entries if the correct password is entered”. By explicitly stating “My program uses logic to determine…”, one can take the guesswork out of awarding points for the grader. This example does a nice job of explaining how both procedures do their work independently, but then also connects what they do in the conclusion.

Student Response

2c. As my program uses Firebase databases to store user data, AccountDB.GotValue is an important algorithm as it handles all data retrieved from the account database such as users and passwords. Because Firebase data requests are handled asynchronously to the program, it is necessary that when data is sent back from Firebase, the algorithm examines the tag and values sent back in order to properly redirect the program to either proceed with a login or create account procedure.
One of the integrated algorithms is the procedure called loginProcedure (above). When called, the procedure loginProcedure will login in the user and load up the user’s diary entries if the correct password is entered. Otherwise, an error message will appear and the user will have to try again.
The procedure createAccount shown above is another integrated algorithm that helps create a user’s account and mark the designated locations for the user’s data in Firebase given that they had provided a valid password and an unique username. The integration of the two procedures createAccount and loginProcedure helps the overall algorithm perform and regulate the core functions of the login screen of creating accounts and logging in.

Row 7: Applying Abstraction (Response 2D)

Requirements Score Explanation

Selected code segment is a student-developed abstraction.

Indicated by placing a rectangle around the specific piece of code in the entire program code section.

If using the template, a screenshot is provided directly with the response.

1

By the definition of abstraction, the selected code segment does implement an abstraction. The abstraction pictured here is a student-developed procedure called loadUserEntryData.

The written response matches the selected code.

Additional Explanation

The abstraction chosen is a procedure. This is one of the easiest types of abstractions to develop and explain.

Student Response

2d. One abstraction I developed to manage the complexity of my code was the procedure loadUserEntryData. loadUserEntryData helps populate a list of user’s entries and is called multiple times throughout the program using different (albeit only slightly) parameters. Implementing this abstraction improves the readability of the code by reducing redundancy and the overall line count. Instead of repeating the nine lines of code in every place, I would only need to call the procedure loadUserEntryData. In addition, this abstraction manages complexity as any future changes that need to be made to loading user entry data can be done in a single place. Overall, this abstraction was a helpful in managing redundancy, length of code, editability, and overall complexity.

Row 8: Applying Abstraction (Response 2D)

Requirements Score Explanation

Explains how the selected abstraction manages the complexity of the program.

1

The response indicates that the abstraction (procedure loadEntryData) “manages complexity as any future changes that need to be made to loading user entry data can be done in a single place. Overall, this abstraction was helpful in managing redundancy, length of code, edit ability, and overall complexity.”

Additional Explanation

This response is very well written. It hits on several examples that would earn the point for the scoring criteria. One simple example is “Instead of repeating the nine lines of code in every place, I would only need to call the procedure loadUserEntryData.”

Student Response

2d. One abstraction I developed to manage the complexity of my code was the procedure loadUserEntryData. loadUserEntryData helps populate a list of user’s entries and is called multiple times throughout the program using different (albeit only slightly) parameters. Implementing this abstraction improves the readability of the code by reducing redundancy and the overall line count. Instead of repeating the nine lines of code in every place, I would only need to call the procedure loadUserEntryData. In addition, this abstraction manages complexity as any future changes that need to be made to loading user entry data can be done in a single place. Overall, this abstraction was a helpful in managing redundancy, length of code, editability, and overall complexity.

8.9.2. Sample 2 - 2018’s Sample E

Row 1: Developing a Program with a Purpose (Video and Response 2A)

Requirements Score Explanation

A.) The video demonstrates the running of at least one feature of the program submitted.

AND

B.) The response (audio narration or written response) identifies the purpose of the program (what the program is attempting to do).

1

A.) The video is continuously running and illustrates the running of the program.

AND

B.) The response states the purpose as allowing the user to "put in whatever terms and definitions they desire and study off them later on flashcards."

Additional Explanation

While the video shows the running of the app, please be sure to take into consideration the atmosphere in which you record your video. The background noise does not make the student lose points, but it does distract from the focus of the video. The write up does a nice job of stating, “The purpose of the app…”

Student Response

Click here to watch video

2a.The program is a study guide app. The program was created in App Inventor 2. The purpose of this app is so that the user can put in whatever terms and definitions they desire and study off them later on flashcards. At first, the user puts in the desired term and definition in the two textboxes and then click submit allowing them to put in different terms and definitions after. When they are finally done, they click the study button which takes away the terms and definitions and just shows the term as a flashcard. Then to see what the definition is, they can click the flash card. The video shows the user plugging in values and later studying them as if there were real flashcards.

Row 2: Developing a Program with a Purpose (Response 2B)

Requirements Score Explanation

Describes or outlines steps used in the incremental and iterative development process to create the entire program.

0

The response does not describe the incremental or iterative process used in developing the entire program. The response focuses on two decisions that were made in determining what would be in the program. A good response would describe the steps taken to develop the program including information about the testing, debugging, and refinement of the program once the initial code was written.

Additional Explanation

Focus on the process for this row of the scoring criteria. The response to section 2b needs to cover both row 2 and row 3 on the scoring criteria. This response tries to cover row 3, but neglects to cover row 2. By keeping a journal of the process, a step-by-step description of the development of the app should be easy to put together for this requirement.

Student Response

2b. There were many problems that arose while coding the program. One of the early problems encountered was deciding how I should set up my study guide. For example, I could have chosen to do flashcards along with doing multiple choice. However, I felt that the flash cards would be more effective and efficient way of creating this app. Furthermore, when making this study guide app, I felt that there needed to be something else that could have made the study guide more useful for the reader. Originally, there were just flashcards, but I felt there was something else that could be done. So I included another button that allowed the user to type in the definition as the word was being given. This was a major development addition as it is more effective for the user to write the information than by just looking at cards. This is also more effective for memorization.

Row 3: Developing a Program with a Purpose (Response 2B)

Requirements Score Explanation

A.) Specifically identifies at least two program development difficulties or opportunities.

AND

B.) Describes how the two identified difficulties or opportunities are resolved or incorporated.

0

A.) The response only describes one program development difficulty/opportunity.

AND

B.) explains how that one difficulty/opportunity was resolved.

The response identifies an opportunity as adding functionality to allow users to enter the "definition as the word was being given." This is resolved by including "another button."

The difficulty identified is the decision to use flashcards over multiple choice, which is a design choice, not a program development difficulty.

Additional Explanation

The lack of clarity in the response led this scorer to not award the point for this row. “One of the early problems I encountered…” is the only part that stuck in the graders mind. After describing that problem and its resolution, the student should have added the phrase, “Then I came across an opportunity to…” This would have redirected the scorer’s attention to check off the requirements from the scoring criteria.

Student Response

2b. There were many problems that arose while coding the program. One of the early problems encountered was deciding how I should set up my study guide. For example, I could have chosen to do flashcards along with doing multiple choice. However, I felt that the flash cards would be more effective and efficient way of creating this app. Furthermore, when making this study guide app, I felt that there needed to be something else that could have made the study guide more useful for the reader. Originally, there were just flashcards, but I felt there was something else that could be done. So I included another button that allowed the user to type in the definition as the word was being given. This was a major development addition as it is more effective for the user to write the information than by just looking at cards. This is also more effective for memorization.

Row 4: Applying Algorithms (Response 2C)

Requirements Score Explanation

Selected code segment implements an algorithm.

Indicated by placing an oval around the specific piece of code in the entire program code section.

If using the template, a screenshot is provided directly with the response.

1

By the definition of an algorithm, the selected code segment does implement an algorithm.
The main algorithm pictured here is the NextButton.Click block.
The written response matches the selected code.

Additional Explanation

When selecting an algorithm, please be mindful of the definition. It must be a formula or a set of steps in order to solve a problem. Also be sure the selected algorithm will be sufficient to earn the points awarded for both row 5 and row 6.

Student Response

2c. 

Row 5: Applying Algorithms (Response 2C)

Requirements Score Explanation

A.) Selected code segment implements an algorithm that uses mathematical or logical concepts.

AND

B.) Explains how the selected algorithm functions

AND

C.) Describes what the selected algorithm does in relation to the overall program.

1

A.) The selected code segment in this case is the main algorithm - the NextButton.click block. It satisfies the math/logic requirement because it uses an If/Else statement with Boolean conditions which counts as logic.

AND

B.)The response explains how the algorithm works: "When the next button is clicked, it displays the label font text and then doesn't show the back text. The index also determined which flashcard that you are on, in which you keep going to the next term as the next button is clicked. Furthermore, if the index is bigger than the number of items in the list then it restarts back to 1, or the first item in the list. This is the same for the other algorithm as they both use an index."

AND

C.) The response also describes what the purpose is for this algorithm in relation to the entire program: "allows the user to go to the next flashcard" and "the user has a study guide environment in which they can type in the necessary term to the definition and then be able to go to the next set of terms.

Additional Explanation

To be sure to earn the point for row 5, students must clearly touch on all three of the “and” requirements. The first is to assure that the algorithm uses mathematical or logical concepts. The if/else block is used in this example meets that requirement. The second part should follow with the step-by-step process of the algorithm. This example doesn’t do a good job of that, but does enough to get the point across. The last requirement is met as it relates the algorithm to the overall program in the introductory sentence. This explicit type of technical writing leaves nothing up to interpretation.

Student Response

2c. This particular algorithm is essential to the program because it allows the user to go to the next flashcard. When the next button is clicked, it displays the label font text and then doesn't show the back text. The index also determined which flashcard that you are on, in which you keep going to the next term as the next button is clicked. Furthermore, if the index is bigger than the number of items in the list then it restarts back to 1, or the first item in the list. This is the same for the other algorithm as they both use an index. One of the independent algorithms makes so that user can type in the term as the other algorithm is displaying the definition as a flashcard. Together as a combination, this makes it so that the user has a study guide environment in which they can type in the necessary term to the definition and then be able to go to the next set of terms.

Row 6: Applying Algorithms (Response 2C)

Requirements Score Explanation

A.) Selected code segment implements an algorithm that includes at least two or more algorithms.

AND

B.) At least one of the included algorithms uses mathematical or logical concepts.

AND

C.) Explains how one of the included algorithms functions independently.

0

A.) The selected code segment includes at least two algorithms that are integrated to create the main algorithm (NextButton).

AND

B.) The included algorithms all contain If/Else statements with Boolean conditions which count as logical concepts to satisfy the math/logic requirement.

AND

C.) The response briefly states that one algorithm "makes [it] so that user can type in the term as the other algorithm is displaying the definition as a flashcard." However, it is not clear where each of these algorithms is in the supplied code segment, so it is not clear if these algorithms are included in the identified algorithm.

While the reader may be able to identify sub-algorithms in the main algorithm, the student’s response must clearly identify the sub- algorithms and explain at least one sub-algorithm.

Additional Explanation

Again, covering all three requirements is necessary to earn this point in the scoring criteria- 2 out of 3 did not get the job done on this example. The two integrated algorithms from the overall algorithm are both if/else statements so that covers the first two requirements. While the sentence starter “One of the independent algorithms…” is a great attention-getter for the reader, this example follows it up with an algorithm that is not part of the selected one. Be sure students double-check their continuity to clean up this type of mistake.

Student Response

2c. This particular algorithm is essential to the program because it allows the user to go to the next flashcard. When the next button is clicked, it displays the label font text and then doesn't show the back text. The index also determined which flashcard that you are on, in which you keep going to the next term as the next button is clicked. Furthermore, if the index is bigger than the number of items in the list then it restarts back to 1, or the first item in the list. This is the same for the other algorithm as they both use an index. One of the independent algorithms makes so that user can type in the term as the other algorithm is displaying the definition as a flashcard. Together as a combination, this makes it so that the user has a study guide environment in which they can type in the necessary term to the definition and then be able to go to the next set of terms.

Row 7: Applying Abstraction (Response 2D)

Requirements Score Explanation

Selected code segment is a student-developed abstraction.

Indicated by placing a rectangle around the specific piece of code in the entire program code section.

If using the template, a screenshot is provided directly with the response.

1

By the definition of abstraction, the selected code segment does implement an abstraction. The abstraction pictured here is a student-developed procedure called procedure.

The written response matches the selected code.

Additional Explanation

The abstraction chosen is a procedure. This is one of the easiest types of abstractions to develop and explain.

Student Response

2d. 

Row 8: Applying Abstraction (Response 2D)

Requirements Score Explanation

Explains how the selected abstraction manages the complexity of the program.

1

The response gives a reason why the abstraction (procedure) manages complexity: "By creating this abstraction it makes the general coding clearer and easier to read as it is already being used once."

Additional Explanation

While this explanation does a good job of telling what the procedure does, it waits until the last sentence to earn the point. Giving the reader the reasons “...makes the general coding clearer and easier to read…” effectively illustrates the managing of the complexity. It also subtly points out how it reduces redundancy.

Student Response

2d. This particular abstraction is used to determine if the word you type in, is correct. This abstraction uses mathematical concepts by determining if the word you type in and the actual term, are equal. If they do happen to be equal, then this will be shown in the “lblWriteWrong.” Furthermore, this abstraction uses logical concepts by determining if the word the user types in is true, then it will be displayed as correct through the Write Wrong label. However if the word the user types in is a false word, then it will show that it is incorrect through the Write Wrong label. By creating this abstraction it makes the general coding clearer and easier to read as it is already being used once.

You have attempted of activities on this page