AP CSP Pseudocode Practice

25 coding exercises in the exam reference sheet language, from easy to hard. Write the code in the browser, press Check to run every test, then compare with a solution. Free, no sign-up.

Easy 8 exercises

Medium 10 exercises

Hard 7 exercises

For teachers

Open any exercise and press Add to my class: it is copied into one of your learning paths with its tests, ready to assign. Students solve it in the pseudocode runner and their work is graded automatically.

Frequently asked questions

What language are the exercises in?

In the AP CSP exam reference sheet language, the pseudocode used on the exam: ← for assignment, DISPLAY and INPUT, REPEAT, FOR EACH, procedures and lists that start at index 1.

How does Check work?

Check runs your program once for every test in your browser. Each test gives the values INPUT () reads, and your DISPLAY output must match the expected output (extra spaces do not matter).

Can a teacher give these exercises to a class?

Yes. A signed-in teacher can add any exercise to a learning path in one click, then assign it to a class. Students solve it in the pseudocode runner and it is graded automatically.

Is my progress saved?

The exercises you solved are remembered in this browser and marked on the list.

The exercises are written by CodeUtility. AP is a trademark registered by the College Board, which is not affiliated with, and does not endorse, this site.