What this deck covers
This deck focuses on Calling Procedures, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science Principles.
Study Calling Procedures in AP Computer Science Principles with focused flashcards that help you recognize the idea, recall the key rule, and apply it in practice-style prompts.
0% Complete
What is a procedure in programming?
Tap card or press Space to flip
A named section of code that performs a specific task. Code blocks enable reusability and modularity.
How well did you know it?
Card 1 / 48
Space to flip · ← / → to move · once flipped, → Got it · ← Still learning
This deck focuses on Calling Procedures, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science Principles.
Work through these flashcards in short sessions. Try to answer each prompt before flipping the card, then revisit any cards you miss until the explanation feels automatic.
Answer: A named section of code that performs a specific task. Code blocks enable reusability and modularity.
Answer: Function name and parameter list. Identifies the procedure and its expected inputs.
Answer: Calling a procedure. Invokes the procedure to run its code.
Answer: A procedure associated with a class/object. Function bound to a specific class instance.
Answer: Parameters refer to argument locations. Changes to parameters affect original variables.
Answer: Procedure does not return a value. Procedures that perform actions without output.
Answer: Parameters. Parameters define what inputs the procedure expects.
Answer: Non-default parameter 'z' after default 'y'. Required parameters cannot follow optional ones.
Answer: Return value. What the procedure sends back to the caller.
Answer: Missing one argument in 'add(3)'. Function expects two arguments but only receives one.
Answer: Within the procedure where it is defined. Parameters only exist within their procedure's execution.
Answer: Missing one argument in 'example(2)'. Two parameters required but only one provided.
Answer: They promote code reuse and organization. Avoid code duplication and improve maintainability.
Answer: Yes. Default values provide flexibility in procedure calls.
Answer: A procedure associated with a class/object. Function bound to a specific class instance.
Answer: Correct: 'def myFunc(x, y): return x + y'. Missing colon after parameter list in function definition.
Answer: Parameters. Parameters define what inputs the procedure expects.
Answer: Remove 'return' before 'print'. Cannot return a function call that returns None.
Answer: A named section of code that performs a specific task. Code blocks enable reusability and modularity.
Answer: Procedure does not return a value. Procedures that perform actions without output.
Answer: Correct: 'def myFunc(x, y): return x + y'. Missing colon after parameter list in function definition.
Answer: Non-default parameter 'y' after default 'x'. Required parameters must come before defaults.
Answer: False. Void procedures perform actions without returning values.
Answer: Procedure calls itself. Enables solving problems by breaking them down.
Answer: Missing return statement. Function prints but doesn't return the sum value.
Answer: Dividing a program into separate modules. Breaks complex problems into manageable components.
Answer: False. Void procedures perform actions without returning values.
Answer: Typically, 'None' or equivalent. Default return when no explicit return statement exists.
Answer: They promote code reuse and organization. Avoid code duplication and improve maintainability.
Answer: Missing return statement. Function prints but doesn't return the sum value.
Answer: Dividing a program into separate modules. Breaks complex problems into manageable components.
Answer: To receive arguments as input. Acts as placeholder for values passed during calls.
Answer: Missing one argument in 'add(3)'. Function expects two arguments but only receives one.
Answer: Remove 'return' before 'print'. Cannot return a function call that returns None.
Answer: Calling a procedure. Invokes the procedure to run its code.
Answer: Arguments are copied into parameters. Original values remain unchanged in calling code.
Answer: Parameters refer to argument locations. Changes to parameters affect original variables.
Answer: Non-default parameter 'y' after default 'x'. Required parameters must come before defaults.
Answer: Typically, 'None' or equivalent. Default return when no explicit return statement exists.
Answer: Within the procedure where it is defined. Parameters only exist within their procedure's execution.
Answer: Arguments are copied into parameters. Original values remain unchanged in calling code.
Answer: Procedure calls itself. Enables solving problems by breaking them down.
Answer: Function name and parameter list. Identifies the procedure and its expected inputs.
Answer: Yes. Default values provide flexibility in procedure calls.
Answer: Return value. What the procedure sends back to the caller.
Answer: To receive arguments as input. Acts as placeholder for values passed during calls.
Answer: Non-default parameter 'z' after default 'y'. Required parameters cannot follow optional ones.
Answer: Missing one argument in 'example(2)'. Two parameters required but only one provided.