AP Exam Vocab Flashcards

1
Q

General Programming

What is a program?

A

a collection of program statements that performs a specific task when run by a computer

aka software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

General Programming

What is a code segment?

A

collection of program statements that are part of a program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

General Programming

What is a code statement?

A

a part of program code that expresses an action to be carried out

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

General Programming

What is an expression?

A

it consists of a value, a variable, an operator, or a procedure call that returns a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

General Programming

Is ‘if num> 10):’ an expression?

A

Yes, because it returns either True or False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

General Programming

What is program behavior?

A
  • how a program functions when it is running
  • often described by how a user interacts with it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

General Programming

What is program output?

A
  • any data sent from a program to a device
    Ex. tactile, audio, visual, or text
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

General Programming

What is an iterative development process?

A
  • Iterative refers to repetition, so this process requires repeated refinement and revision based on feedback, testing, or reflection
  • May involve revisiting earlier phases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

General Programming

What is an incremental development process?

A

Increments refers to smaller segments, so this process involves breaking the problem into smaller pieces and making sure it works before adding it to the whole

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

General Programming

What is a simulation?

A
  • representation that uses varying sets of values to reflect the changing state of a phenomenon
  • real world models that abstract details away to get a simplified view → help learn about the world or predict events
  • NOTE: may contain bias due to abstraction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Debugging

What is a syntax error, and provide an example.

A
  • When rules of the programming language are not followed
  • Ex. Incorrect parentheses, incorrect indentation, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Debugging

What is a runtime error, and provide an example.

A
  • When mistakes occur during the execution of a program
  • Ex. Dividing by zero, index is out of bounds (going past the length or using a negative number depending on the language), etc.
    • NOTE: programming languages define their own run-time errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Debugging

What is a logical error?

A
  • When the algorithm or program behave incorrectly or unexpectedly
  • Hard to pick up on
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Debugging

What is testing?

A
  • Uses defined inputs to ensure that an algorithm/program is producing the expected outcomes
  • Results from testing are used to revise algorithms/programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Debugging

What is a comment?

A

a form of program documentation written into the program to be read by people and do not affect how a program runs
- Ex. In CMU, hashtags were used for this.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Debugging

What is program documentation?

A

a written description of the function of a code segment, event, procedure, or program and how it was developed

17
Q

Procedural Abstraction

What is a procedure?

A

a named group of programming instructions that may have parameters and return values.

aka a function

18
Q

Debugging

What are parameters?

A

input variables of a procedure
- Ex. For this function, drawLine(x1, y1, x2, y2), x1, y1, x2, y2 are parameters

19
Q

Debugging

What are arguments?

A
  • specify the values of the parameters when a procedure is called
  • must be in the correct order of the parameters
    and only use after they are defined
  • Ex. For this function, drawLine(x1, y1, x2, y2), 1, 5, 6, 5 are arguments
20
Q

Debugging

What is program input?

A
  • any data sent to a computer for processing by a program
    Ex. tactile, audio, visual, or text
21
Q

Debugging

What is modularity?

A

the subdivision of a computer program into separate subprograms

22
Q

Data Abstraction

What is a variable?

A
  • an abstraction inside a program that can hold a value, and each has associated data storage that represents one value at a time, but that value can be a list or other collection that in turn contains multiple values
  • NOTE: Global variables are defined in to-level code, outside of any functions, can be used anywhere, but should be used lightly. Local variables can only be used in the function where they are defined.
23
Q

Debugging

What is an event?

A
  • associated with an action and supplies input data to a program
  • Ex. onMousePress OR onEvent (“Home Button”)
24
Q

Data Abstraction

What is an element?

A
  • an individual value in a list that is assigned a unique index
    Ex. For list = [“Jayla”, “Jayden”, “Jaylen”], “Jayla” is an element.
25
# Data Abstraction What is an **index**?
- a common method for referencing the elements in a list or string using natural numbers Ex. For list = ["Jayla", "Jayden", "Jaylen"], "Jayla" is at index 1 since index starts at 1.