AP Computer Science Unit 3: Boolean Expressions (copy)

studied byStudied by 16 people
5.0(1)
Get a hint
Hint

Boolean

1 / 22

23 Terms

1

Boolean

an expression or statement that returns True or False

New cards
2

Selection statement

statements used to determine whether code should be run or skipped

New cards
3

DeMorgans law

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

New cards
4

If statement

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

New cards
5

What is ‘==’?

equal to

New cards
6

What is ‘!=’?

not equal to

New cards
7

What is ‘<=’?

less than or equal to

New cards
8

What is ‘<‘?

less than

New cards
9

What is ‘>’?

greater than

New cards
10

What is ‘>=’?

greater than or equal to

New cards
11

Yoda Notation

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

New cards
12

Nesting

When a selection is placed inside a selection

New cards
13

Scope

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

New cards
14

Conjunction Operators

operators that combine two boolean values and produce a new result

New cards
15

The AND conjunction returns true when?

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

New cards
16

The OR conjunction returns true when?

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

New cards
17

What is ‘&&’?

logical AND operator

New cards
18

What is ‘| |’

logical OR operator

New cards
19

What is ‘!”

logical NOT

New cards
20

Comparison Operator

operators that are used to compare two values

New cards
21

What does equals(Object o) do?

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

New cards
22

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

New cards
23

short circuiting

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

New cards

Explore top notes

note Note
studied byStudied by 28 people
... ago
5.0(1)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 37 people
... ago
5.0(1)
note Note
studied byStudied by 8 people
... ago
5.0(1)
note Note
studied byStudied by 20 people
... ago
5.0(1)
note Note
studied byStudied by 38 people
... ago
5.0(2)
note Note
studied byStudied by 15 people
... ago
5.0(1)
note Note
studied byStudied by 11 people
... ago
4.5(2)

Explore top flashcards

flashcards Flashcard (135)
studied byStudied by 120 people
... ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (34)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (105)
studied byStudied by 33 people
... ago
5.0(2)
flashcards Flashcard (20)
studied byStudied by 39 people
... ago
5.0(2)
flashcards Flashcard (35)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (58)
studied byStudied by 2 people
... ago
4.0(1)
flashcards Flashcard (22)
studied byStudied by 274 people
... ago
5.0(10)
robot