AP Computer Science Unit 3: Boolean Expressions (copy)

5.0(1)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/22

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

23 Terms

1
New cards

Boolean

an expression or statement that returns True or False

2
New cards

Selection statement

statements used to determine whether code should be run or skipped

3
New cards

DeMorgans law

Set of rules for converting an expression that contains NOTs into one without any NOTs

4
New cards

If statement

a conditional statement that runs when the condition is true; it helps control the flow of the program

5
New cards

What is ‘==’?

equal to

6
New cards

What is ‘!=’?

not equal to

7
New cards

What is ‘<=’?

less than or equal to

8
New cards

What is ‘<‘?

less than

9
New cards

What is ‘>’?

greater than

10
New cards

What is ‘>=’?

greater than or equal to

11
New cards

Yoda Notation

When the variable is put on the right side of a comparison

12
New cards

Nesting

When a selection is placed inside a selection

13
New cards

Scope

refers to the area where a variable exists and can be used

14
New cards

Conjunction Operators

operators that combine two boolean values and produce a new result

15
New cards

The AND conjunction returns true when?

The AND project produces a true value when both of its operands are True

16
New cards

The OR conjunction returns true when?

The OR conjunction is true when one value in it’s operands is true

17
New cards

What is ‘&&’?

logical AND operator

18
New cards

What is ‘| |’

logical OR operator

19
New cards

What is ‘!”

logical NOT

20
New cards

Comparison Operator

operators that are used to compare two values

21
New cards

What does equals(Object o) do?

returns True if the called object is equal to the received object

22
New cards

What does compareTo(Object o) do?

Returns 0 if the called and received object are the same

Returns a positive number when the received object is smaller than the called object

Returns a negative number when the received object is greater than the called object

23
New cards

short circuiting

The process of not evaluating the right operand in a Boolean expression/statement