Computer Science A Unit 3

studied byStudied by 7 people
0.0(0)
Get a hint
Hint

If statements

1 / 8

flashcard set

Earn XP

Description and Tags

Boolean expressions and if statnts

9 Terms

1

If statements

will only run and execute when a certain condition is true; and will ignore the code if the statement isn’t true

one-way selection

New cards
2

Flow of control

The order in which different lines of code will run

Typically each line of code runs from top to bottom

If statements can change the sequence

New cards
3

Two-way selection

if -else statement, meaning there are 2 watts that the code could run, the if or the else

New cards
4

Multi-way selection

If-else-if statement, which only runs one of the man y different listed conditions

New cards
5

Boolean expression

logical operations that check for multiple conditions at once

combines 2 separate Boolean expressions into a single compound Boolean expression

statement or condition that evaluates to true of false

New cards
6

Truth table

used to look at all possible values of the variables, and determine the value of the whole statement

New cards
7

Short-circuit evaluation

When the result of a logical expression using && or || can be determined by evaluating only the first Boolean expression, the second is not evaluated

New cards
8

Morgan’s first Law

If both A and B are true, them the whole expression is true

New cards
9

Morgan’s second Law

If some part of a || statement is true, then the whole expression is true

New cards

Explore top notes

note Note
studied byStudied by 9 people
... ago
4.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 106 people
... ago
5.0(1)
note Note
studied byStudied by 12 people
... ago
4.0(1)
note Note
studied byStudied by 139 people
... ago
4.0(1)
note Note
studied byStudied by 11 people
... ago
4.0(1)
note Note
studied byStudied by 64 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (52)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (58)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (44)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (330)
studied byStudied by 58 people
... ago
5.0(1)
flashcards Flashcard (103)
studied byStudied by 12 people
... ago
5.0(3)
flashcards Flashcard (117)
studied byStudied by 9 people
... ago
5.0(1)
flashcards Flashcard (51)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (107)
studied byStudied by 1 person
... ago
5.0(1)
robot