Celsius to Fahrenheit
public static double toFahrenheit(double c) { return 9 / 5 * c + 32; }
- boiling point · expected 212, got 132
- freezing point · 0 → 32
- minus forty · expected −40, got −8
- body temperature · expected 98.6, got 69
AP COMPUTER SCIENCE A
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.
HOW IT WORKS
Problems are grouped by the ten AP CSA units. Each one has a short statement and starter code to build on.
Fill in the method or class in the editor. Run it against the tests and see exactly which cases pass and which fail.
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
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
PROGRESS
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.
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.
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.
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.
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.
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.