AP Computer Science Principles Reference Sheet Vocabulary

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering the AP Computer Science Principles Exam Reference Sheet, including operators, selection, lists, procedures, and robot commands.

Last updated 9:04 PM on 5/2/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

a ← expression

Evaluates expression and then assigns a copy of the result to the variable a.

2
New cards

DISPLAY(expression)

Displays the value of expression, followed by a space.

3
New cards

INPUT()

Accepts a value from the user and returns the input value.

4
New cards

a / b

The arithmetic operator used to perform division on a and b. For example, 17/517 / 5 evaluates to 3.43.4.

5
New cards

a MOD b

Evaluates to the remainder when a is divided by b. Assume a is an integer 0\ge 0 and b is an integer > 0. For example, 17 MOD 517 \text{ MOD } 5 evaluates to 22.

6
New cards

RANDOM(a, b)

Generates and returns a random integer from a to b, including a and b, where each result is equally likely to occur.

7
New cards

Relational Operators

The symbols ==, \neq, >, <, \ge, and \le used to test the relationship between two variables, expressions, or values, evaluating to a Boolean value.

8
New cards

NOT condition

Evaluates to true if condition is false; otherwise evaluates to false.

9
New cards

condition1 AND condition2

Evaluates to true if both condition1 and condition2 are true; otherwise evaluates to false.

10
New cards

condition1 OR condition2

Evaluates to true if condition1 is true or if condition2 is true or if both are true; otherwise evaluates to false.

11
New cards

IF(condition)

A selection statement where the code in the block of statements is executed only if the Boolean expression condition evaluates to true.

12
New cards

REPEAT n TIMES

An iteration structure where the code in the block of statements is executed exactly n times.

13
New cards

REPEAT UNTIL(condition)

An iteration structure where the code in the block of statements is repeated until the Boolean expression condition evaluates to true.

14
New cards

List Indexing

The first element of a list is at index 11; if an index is less than 11 or greater than the length of the list, an error message is produced and the program terminates.

15
New cards

aList[i]

Accesses the element of aList at index i.

16
New cards

INSERT(aList, i, value)

Any values in aList at indices greater than or equal to i are shifted one position to the right, the length increases by 11, and value is placed at index i.

17
New cards

APPEND(aList, value)

The length of aList is increased by 11, and value is placed at the end of aList.

18
New cards

REMOVE(aList, i)

Removes the item at index i in aList and shifts to the left any values at indices greater than i, decreasing the length of aList by 11.

19
New cards

LENGTH(aList)

Evaluates to the number of elements in aList.

20
New cards

FOR EACH item IN aList

The variable item is assigned the value of each element of aList sequentially from first to last, executing the block of statements once for each assignment.

21
New cards

PROCEDURE procName(parameter1, parameter2, …)

Defines a procedure that takes zero or more arguments and contains a block of statements.

22
New cards

RETURN(expression)

Returns the flow of control to the point where the procedure was called and returns the value of expression; causes an immediate return from the procedure.

23
New cards

MOVE_FORWARD()

The robot moves one square forward in the direction it is facing; if the square is not open or beyond the edge, the program terminates.

24
New cards

ROTATE_LEFT()

The robot rotates in place 9090 degrees counterclockwise.

25
New cards

CAN_MOVE(direction)

Evaluates to true if there is an open square one square in the direction (left, right, forward, or backward) relative to where the robot is facing.