Student Coding Tool

Online Java & Python Compiler

Run quick Java and Python practice programs while working through AP CSA, AP CSP, Python, USACO, data science, and project assignments.

Current language

Java Online Compiler

Open full screen

Starter idea for Java

public class Main {
    public static void main(String[] args) {
        int[] scores = {88, 92, 79, 95};
        int total = 0;

        for (int score : scores) {
            total += score;
        }

        System.out.println("Average: " + (total / scores.length));
    }
}

Practice prompts

  • Change the starter data and predict the output before running it.
  • Add one edge case, such as an empty list or a single score.
  • Rewrite the logic using a helper method or function.
  • Explain the bug if the output differs from your prediction.