AP COMPUTER SCIENCE A

AP CSA practice,
right in your browser.

Forty Java problems that cover all ten units of AP Computer Science A. Write the method, press Run, and see which tests pass. No install, no account needed to start.

  • 40 problems
  • 10 units
  • 5 FRQ-style with rubrics
  • English and 中文

HOW IT WORKS

Write it. Run it. Fix it.

  1. 01

    Pick a problem

    Problems are grouped by the ten AP CSA units. Each one has a short statement and starter code to build on.

  2. 02

    Write real Java

    Fill in the method or class in the editor. Run it against the tests and see exactly which cases pass and which fail.

  3. 03

    Get unstuck

    Ask for a hint, or have Titan grade a free-response answer against the rubric. Titan opens with your problem and code ready; nothing is sent until you press send.

A TASTE OF IT

What a problem looks like

Celsius to Fahrenheit

Complete toFahrenheit so it returns the Fahrenheit temperature for c degrees Celsius. F = C × 9 / 5 + 32. Watch out for integer division: 9 / 5 is 1 in Java.

From Unit 1, Primitive Types. Tests check the boiling point, the freezing point, minus forty and body temperature.

public class Temperature {
  public static double toFahrenheit(double c) {
    return 0;
  }
}

ALL 40 PROBLEMS

Ten units, four problems each

PROGRESS

Your progress stays with you

Solved problems are remembered in your browser. If you sign in with a Titan account, your progress follows you across devices, shows up in your mistake book, and appears on the Today page in Gunn Tools. Saving your code drafts to your account is on by default and has an off switch right on the practice page.

Questions

Is the AP CSA practice free?

Yes. You can open it and start solving problems without an account. Signing in with Titan is optional and only adds syncing across your devices.

Do I need to install Java?

No. Your Java runs in the browser, so there is nothing to install. The first run loads a Java runtime, which takes a few seconds; later runs are quick.

Does it cover the whole AP Computer Science A course?

It has 40 problems across the 10 units of the course, from primitive types through recursion, including 5 free-response (FRQ) style problems with a scoring rubric. It is practice, not a full replacement for your textbook or class.

What happens when I get stuck?

Each problem has an Ask for a hint button that opens Titan with the problem and your code ready to send. For free-response problems you can also ask Titan to grade your answer against the rubric. Nothing is sent until you press send.

Is this affiliated with the College Board?

No. Titan AI is made by a Gunn High School student. AP and Advanced Placement are registered trademarks of the College Board, which is not involved with this site.

Ready for problem one?