AP Computer Science Unit 3: Boolean Expressions

studied byStudied by 210 people
5.0(4)
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 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 17 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 7 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 24 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 184 people
Updated ... ago
5.0 Stars(2)

Explore top flashcards

flashcards Flashcard86 terms
studied byStudied by 27 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard122 terms
studied byStudied by 25 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard20 terms
studied byStudied by 34 people
Updated ... ago
5.0 Stars(4)
flashcards Flashcard78 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard22 terms
studied byStudied by 74 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard45 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 25 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard90 terms
studied byStudied by 8024 people
Updated ... ago
4.4 Stars(62)