What is a branch?
a statement executed under a certain condition.
What does a decision do?
create two branches.
What is another name for a decision and it’s two branches?
If-else
true or false 5 > 5?
False
if a series of decision branches appear cascading what is that known as?
If-elseif branch
If-elseif branchs appear on which branch?
The false branch
what is the name of == operator?
equality operator
When does == execute?
executes true when left and right sides are equal
A brach that has an if-else branch connected to another is known as?
Nested Branch
Can a nested brached have different varibles than the if-else branch it is connected to?
Yes
Explain multiple if branches.
Each decision is independent and more than one branch execute.
When using an equality operator what does == mean?
The variables to the left and right of == are equal
Example: 5 == 5
When using an equality operator what does != mean?
The variables to the left and right of == are not equal
Example: 5 != 1
Using equality operators what does >= mean?
a is greater than or equal to b
Using equality operators what does <= mean?
a is less than or equal to b
If you see 20..50 what is the expression showing?
a range of numbers from 20 all the way to 50.
Counting from 0 to 100 using two range expressions if the first is 0..10 what is the second range?
11..100
logical operators use which words?
and, or, not
When does the “and” operator evaluate to true?
When (a) and (b) are true
When does the “or” operator evaluate to true?
When any operand is true (a, b or both)
When does the “not” operator evaluate to true?
When (a) and (b) are false
(7 > 5) and (9 < 20) is this expression true or false?
True
(x > 10) or (y > 20) is this expression true or false?
False
not( (x > 5) and (y < 20) ) is this expression true or false?
False