AP Computer Science Principles Flashcards: Program Function and Purpose
Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026
Review key ideas with interactive flashcards. This set includes 36 cards to help you master important concepts.
Identify the output produced by a program.
Outputs are any data sent from a program to a device, which can be in forms like tactile, audio, visual, or text.
Card 1 of 36
All Flashcards (36)
Identify the output produced by a program.
Outputs are any data sent from a program to a device, which can be in forms like tactile, audio, visual, or text.
Explain how a program or code segment functions at a basic level.
A program or code segment functions by executing a collection of program statements to perform a specific task when run by a computer.
What is an event in the context of programming?
An event is associated with an action and supplies input data to a program.
A user types their name into a text box and clicks 'Submit'. Identify an event and an input in this scenario.
The mouse click is an event, and the text of the user's name is an input.
What are program inputs?
Program inputs are data sent to a computer for processing by a program.
What is the purpose of a computing innovation?
The purpose of computing innovations is to solve problems or to pursue interests through creative expression.
What is the 'behavior' of a program?
The behavior of a program is how a program functions during execution and is often described by how a user interacts with it.
How is a program's behavior typically described from a user's point of view?
A program's behavior is often described by how a user interacts with it.
Besides user actions, what else can serve as an input to a program?
Input can come from other programs in addition to coming from a user.
What is event-driven programming?
In event-driven programming, program statements are executed when triggered rather than through the sequential flow of control.
How does an event affect the flow of execution in a program?
An event can trigger program statements to be executed, affecting the flow of execution, especially in event-driven programming.
What is the relationship between program inputs and outputs?
Inputs usually affect the output produced by a program.
What determines the output of a program that has no direct user input?
Program output can be based on its prior state, such as its internal values, even without direct input.
Why can't a program be designed to work for only a single, specific input?
A program needs to work for a variety of inputs and situations to be broadly useful.
What are the two levels of detail at which a program can be described?
A program can be described broadly by what it does, or in more detail by both what it does and how its statements accomplish this function.
A music player displays the song title on screen and plays the song through speakers. Identify two different forms of output.
The song title displayed on screen is visual output, and the music played through the speakers is audio output.
What does an event provide to a program?
An event is associated with an action and supplies input data to a program.
Identify the input to a program.
Inputs are data sent to a computer for processing by a program, which can come from a user or another program.
Where can program input originate from?
Input can come from a user or other programs.
What defines how a program functions during execution?
The behavior of a program, often described by user interaction, is how a program functions during execution.
How does a code segment relate to a program?
A code segment is a collection of program statements that forms a part of a larger program.
What is a key requirement for a program's functionality regarding its inputs?
A program needs to work for a variety of inputs and situations.
What is the difference between a program and a code segment?
A program is a complete collection of statements that performs a task, while a code segment is a collection of statements that is part of a program.
What is another common term for a program?
A program is often referred to as software.
Identify three different forms program output can take.
Program output can come in a variety of forms, such as tactile, audio, visual, or text.
How does understanding the purpose of a computing innovation help developers?
An understanding of the purpose of a computing innovation provides developers with an improved ability to develop that computing innovation.
Give two examples of actions that can generate an event.
Events can be generated when a key is pressed, a mouse is clicked, or a program is started.
A mobile game vibrates when a player's character takes damage. What form of output is this?
This is a form of tactile output, which is data sent from a program to a device.
What are program outputs?
Program outputs are any data sent from a program to a device.
Describe the purpose of computing innovations.
The purpose of computing innovations is to solve problems or to pursue interests through creative expression.
What is a code segment?
A code segment is a collection of program statements that is part of a program.
How is program execution controlled in event-driven programming?
In event-driven programming, program statements are executed when triggered by an event, rather than in a predefined sequential order.
What is a program?
A program is a collection of program statements that performs a specific task when run by a computer. A program is often referred to as software.
What two things is program output usually based on?
Program output is usually based on a program’s input or prior state, such as its internal values.
Identify three different forms program input can take.
Program input can come in a variety of forms, such as tactile, audio, visual, or text.
When a user clicks a mouse, what does this action generate for a program?
When a mouse is clicked, an event is generated which can supply input data to a program.