Arguments

In AP Computer Science Principles, arguments are the actual values passed into a procedure when it is called; they specify the values of the procedure's parameters (EK AAP-3.A.3), so calculateTotal(12.99, 5, 0.08) passes three arguments that fill in price, quantity, and taxRate.

Verified for the 2027 AP Computer Science Principles examLast updated June 2026

What are Arguments?

Arguments are the real values you hand to a procedure at the moment you call it. The procedure's definition lists parameters (placeholder input variables), and the call supplies arguments (the actual values that fill those placeholders). The CED states this directly in EK AAP-3.A.3: "Parameters are input variables of a procedure. Arguments specify the values of the parameters when a procedure is called."

Think of a procedure like an order form. Parameters are the blank fields on the form (price, quantity, taxRate). Arguments are what you actually write in those blanks (12.99, 5, 0.08). When the call calculateTotal(12.99, 5, 0.08) runs, the program jumps into the procedure, the parameters take on those argument values in order, the procedure's statements execute, and then control returns to where the call happened. Same procedure, different arguments, different result. That's the whole point of arguments. They let one block of code handle many situations.

Why Arguments matter in AP Computer Science Principles

Arguments live in Topic 3.12 (Calling Procedures) in Unit 3: Algorithms and Programming. The learning objective AP Comp Sci P 3.12.A asks you to do two things: write statements that call procedures, and determine the result or effect of a procedure call. You can't do either without arguments. Getting the right values, in the right order, into the right parameters is exactly what the exam checks. Arguments also matter for procedural abstraction, one of the biggest ideas in the course. A procedure with parameters can be reused anywhere, because each call customizes the behavior with new arguments instead of rewriting the code. The 2026 Written Response questions ask you to explain your own procedure from your Personalized Project Reference, so you need to talk about its inputs accurately, using "argument" and "parameter" correctly.

How Arguments connect across the course

Parameters (Unit 3)

Parameters and arguments are two sides of the same handoff. The parameter is the variable named in the procedure definition; the argument is the value you supply when you call it. The argument in position one fills the parameter in position one, and so on down the line.

Return Value (Unit 3)

Arguments are the input side of a procedure call and the return value is the output side. In result ← calculateTotal(12.99, 5, 0.08), the three arguments go in, the procedure computes, and the returned value lands in result.

Procedural Abstraction (Unit 3)

Arguments are what make abstraction pay off. Instead of writing a separate procedure for every price and tax rate, you write one procedure with parameters and let each call's arguments customize it. One block of code, infinite uses.

Flow of Control (Unit 3)

A procedure call interrupts sequential execution (EK AAP-3.A.4). The arguments get evaluated first, control jumps into the procedure with those values bound to the parameters, and execution resumes after the call once the procedure finishes.

Are Arguments on the AP Computer Science Principles exam?

Multiple-choice questions show you a procedure definition and ask you to pick the correct call, or they show you a call and ask you to trace the result. A typical stem gives something like PROCEDURE calculateTotal(price, quantity, taxRate) and then asks what calculateTotal(12.99, 5, 0.08) returns, which means matching each argument to its parameter by position and stepping through the math. Another common stem shows result ← calculate(a, b, c) and asks which interpretation of the code is NOT valid, testing whether you understand that a, b, and c are arguments being passed in and a value is coming back. On the Written Response section, the 2024 prompt asked you to describe a valid input to your program and what the program does with it, and the 2026 prompts ask you to explain the procedure in your Personalized Project Reference. In both cases, precise language about arguments and parameters is what earns the point.

Arguments vs Parameters

This is the single most common mix-up in Unit 3, and the CED draws the line clearly in EK AAP-3.A.3. Parameters are the input variables written in the procedure's definition. Arguments are the actual values you pass in when you call it. In PROCEDURE applyDiscount(originalPrice, discountRate), the words originalPrice and discountRate are parameters. In the call applyDiscount(50.00, 0.20), the values 50.00 and 0.20 are arguments. Quick memory hook: Parameters appear in the Procedure definition, Arguments appear At the call.

Key things to remember about Arguments

  • Arguments are the actual values passed into a procedure when it is called, and they specify the values of the procedure's parameters (EK AAP-3.A.3).

  • Arguments are matched to parameters by position, so the first argument fills the first parameter, the second fills the second, and so on.

  • Calling the same procedure with different arguments produces different results, which is what makes procedures reusable and is the heart of procedural abstraction.

  • A procedure call interrupts sequential execution, runs the procedure's statements with the argument values bound to the parameters, then returns control to the point after the call.

  • On the exam, expect to trace a call like calculateTotal(12.99, 5, 0.08) step by step and determine the return value, which is exactly what learning objective AP Comp Sci P 3.12.A requires.

Frequently asked questions about Arguments

What are arguments in AP Computer Science Principles?

Arguments are the actual values passed into a procedure when it is called. Per EK AAP-3.A.3, arguments specify the values of the procedure's parameters, so in calculateTotal(12.99, 5, 0.08) the arguments are 12.99, 5, and 0.08.

What's the difference between arguments and parameters?

Parameters are the input variables listed in the procedure's definition, like price and quantity. Arguments are the actual values you supply when you call the procedure, like 12.99 and 5. Definition gets parameters, call gets arguments.

Are arguments and parameters the same thing on the AP CSP exam?

No. The CED treats them as distinct, and exam questions rely on the difference. A parameter is the placeholder variable inside the procedure; the argument is the value that fills it at call time. Mixing them up can cost you on Written Response questions that ask you to explain your procedure's inputs.

Do arguments have to be in a specific order?

Yes. In AP CSP pseudocode, arguments are matched to parameters by position. If a procedure is defined as applyDiscount(originalPrice, discountRate), then calling applyDiscount(0.20, 50.00) would treat 0.20 as the price and 50.00 as the discount rate, giving a wrong answer.

Can a procedure be called with no arguments?

Yes. A procedure with no parameters is called with empty parentheses, like displayBoard(). Arguments are only needed when the procedure's definition includes parameters that need values.