AP comp sci 2

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

1/38

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:25 AM on 5/15/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

39 Terms

1
New cards

Variable Assignment

Evaluates an expression and assigns the result to a variable.

2
New cards

DISPLAY

Displays the value of an expression followed by a space.

3
New cards

INPUT()

Accepts a value from the user and returns it.

4
New cards

Arithmetic Operators

Used to perform arithmetic operations: +, -, *, /.

5
New cards

MOD

Evaluates to the remainder when one integer is divided by another.

6
New cards

RANDOM(a, b)

Returns a random integer between a and b, inclusive.

7
New cards

Relational Operators

Used to test the relationship between two expressions.

8
New cards

NOT condition

Evaluates to true if the condition is false.

9
New cards

AND

Evaluates to true if both conditions are true.

10
New cards

OR

Evaluates to true if at least one condition is true.

11
New cards

IF Statement

Executes a block of statements if the condition evaluates to true.

12
New cards

IF/ELSE Statement

Executes one block of statements if the condition is true, and another if false.

13
New cards

REPEAT n TIMES

Executes a block of statements n times.

14
New cards

REPEAT UNTIL

Repeats a block of statements until the condition is true.

15
New cards

List Indexing

Refers to the element of a list at a specific index.

16
New cards

Assignment in List

Assigns the value of one list element to another.

17
New cards

Creating a List

Assigns values to elements in a list.

18
New cards

For Each Loop

Iterates over each item in a list.

19
New cards

INSERT in List

Inserts a value at a specified index and shifts elements.

20
New cards

APPEND in List

Adds a value at the end of the list.

21
New cards

REMOVE in List

Removes an element from a list and shifts elements left.

22
New cards

LENGTH of List

Evaluates to the number of elements in a list.

23
New cards

Procedure Definition

Defines a procedure that can take parameters and contain instructions.

24
New cards

RETURN in Procedure

Exits the procedure and returns a value.

25
New cards

CAN_MOVE

Evaluates to true if there is an open square in the direction the robot is facing.

26
New cards

Arithmetic Procedures

Functions that perform calculations using arithmetic operators.

27
New cards

Boolean Logic

A way of representing truth values using true and false.

28
New cards

Conditionals

Statements that control the flow of execution based on conditions.

29
New cards

Iteration in Programming

Repeating operations until a certain condition is met.

30
New cards

List Operations

Methods to manipulate and manage lists in programming.

31
New cards

Error Handling in Lists

The process of responding to errors in list indexing.

32
New cards

Parameters in Procedures

Values passed to a procedure to customize its behavior.

33
New cards

Robot Movement

The ability of a robot to move in a grid-based environment based on conditions.

34
New cards

Open Square

A square in the grid that is available for the robot to move into.

35
New cards

Grid Boundaries

The edges of the grid which limit where the robot can move.

36
New cards

Value Assignment

The act of assigning data to a variable or an element in a list.

37
New cards

Return Value

The value yielded by a procedure when it is called.

38
New cards

Execution of a Block

Running a set of instructions defined in brackets.

39
New cards

Initialization of a Variable

Setting a variable to its initial value during declaration.