Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conditional Logic Presentation Name Course Name

Similar presentations


Presentation on theme: "Conditional Logic Presentation Name Course Name"— Presentation transcript:

1 Conditional Logic Presentation Name Course Name
Unit # – Lesson #.# – Lesson Name A computer makes decisions with if statements. Conditional Logic

2 If-else Boolean expression: true or false
The condition is always a Boolean expression. Either Sound1 or Sound2 will play. Never both, but always one of them. Sound3 will happen next, either way.

3 If Sound1 may or may not happen. Sound2 will happen either way.
The condition is always a Boolean expression.

4 If-elseif-else Sound1, 2, or 4 will play. Then Sound3. Notice the two different equal signs for conditions. The first one in blue compares numbers, converting the text. If the text is 05, it will be true. The red one compares texts, converting the number to a string. If the text is 05, this will be false.

5 If-elseif Sound 1 or Sound 2 might play, but possibly neither. Sound 3 plays no matter what.


Download ppt "Conditional Logic Presentation Name Course Name"

Similar presentations


Ads by Google