• AP CSP Assessment Overview and Performance Task Directions for Students - instructions for both the Explore Task and the Create Task, exam reference sheet, and scoring guidelines
• AP CSP: The Exam - official College Board CSP Exam site with exam information, scoring information, and example Performance Task submissions with detailed commentary on the scores these submissions received (looking at these may help you ensure that your submission will earn you full credit)

Snap! has two convenient ways to share some or all of your code.

#### Creating Script Pics

You can download a PNG image file of any block or script by right-clicking it (or control-clicking it on a Mac) and selecting "script pic..." Look in your browser's Downloads folder for the image file.

If you shift-right-click (or shift-control-click) on a reporter block, you will get a script pic of the reporter with it's report bubble showing.

#### Exporting All the Images at Once

You can download an HTML file of all of the blocks in your whole project as well as a picture of the stage by selecting "Export summary..." from the Snap! File menu (). The HTML file also land in your browser's Downloads folder. Open it (in a browser), right-click (or control-click on a Mac) to copy the images you need, and paste them into the document where you are describing your code.

### Describing Abstraction and Algorithm for the AP Create Task

You've been creating algorithms and using abstraction all year. All you need to know for the AP test is how to call attention to and describe what you've done.

#### Algorithm

In Unit 1, you created an algorithm for drawing this pinwheel shape:

The shape consists of eight line segments, each the same length. The first segment is 100 steps long. To prepare for the next segment, the sprite backs up 70 steps along the first segment and turns 45 degrees to the right. Each new line segment follows the same pattern: move 100, move -70, turn 45. It could be written using eight sets of those three blocks (as shown at right). That is the algorithm, but it's hard to read. For one thing, it's hard to tell whether all the blocks are there. Using repeat makes the algorithm clearer, briefer, and easier to read. This is how the algorithm is now expressed:

Your program for the AP task will have different algorithms (stretches of code that accomplish a particular purpose), and you can point to any chunk of code like that in your program as an example of an algorithm.

#### Abstraction

The last step shown above, using repeat to clarify the structure is also a simple example of abstraction. It hides a lot of repetitive detail and shows the structure better. This type of abstraction is not what the AP Create Task is looking for though.

You used another abstraction as well. The way you actually wrote the algorithm in Unit 1 recognized that the 45° turn was \frac{1}{8} of the total turning of 360°. So you wrote the algorithm this way:

Changing both eights to fives in that algorithm would create a pinwheel with 5 branches. Instead of changing the numbers each time you wanted a new pinwheel, you created a block that contained the algorithm and let you just input whatever number of branches you want:

This is the kind of example you need to show for the Create Task: a custom block used multiple times in your project. Loops are an example of abstraction, but the expectation for the Create Task is that you create and submit your own example of abstraction rather than just pointing out existing abstractions like loop blocks.

The abstraction of pinwheel helps in three ways:

1. It saves you from having to change two numbers each time you use the code, which is prone to error (such as accidentally changing only one of them but not the other).
2. Instead of putting all this code

in your program everywhere you want it to draw a pinwheel, you now need only
3. Your code is easier for someone else to read, because it now says what it does: it makes a pinwheel with 8 branches.

When you create a block and give it a name that describes its purpose, you are creating an abstraction. You are hiding the details and showing only the purpose. When you use that pinwheel block, it shows the structure of your program more clearly. Someone reading your program doesn't need to figure out what the details inside pinwheel do; they can tell from the name that it makes a pinwheel with a given number of branches.

Note that while packing your entire program into a single block might the page cleaner, it is not a good example of abstraction. The best examples of abstraction to highlight for the AP are pieces of code that you use multiple times in your program and are clearer because they are packed into a well-named block. You can often use what's in that block as an example of the algorithm for the purpose that the block serves.