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
5.0(1)
note Note
studied byStudied by 44 people
... ago
5.0(1)
note Note
studied byStudied by 9 people
... ago
5.0(2)
note Note
studied byStudied by 484 people
... ago
5.0(12)
note Note
studied byStudied by 26 people
... ago
5.0(2)
note Note
studied byStudied by 14 people
... ago
5.0(1)
note Note
studied byStudied by 14 people
... ago
5.0(2)
note Note
studied byStudied by 85 people
... ago
5.0(2)

Explore top flashcards

flashcards Flashcard (30)
studied byStudied by 121 people
... ago
4.5(2)
flashcards Flashcard (46)
studied byStudied by 12 people
... ago
5.0(1)
flashcards Flashcard (21)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (35)
studied byStudied by 11 people
... ago
4.5(2)
flashcards Flashcard (42)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (56)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (104)
studied byStudied by 37 people
... ago
5.0(1)
flashcards Flashcard (54)
studied byStudied by 4 people
... ago
5.0(3)
robot