Which side of the expression runs first? And when you do an
&& if the left side is
false, does it run the right side? How about an
||? If the left side is
true, does it run the right side?
In this experiment, you’ll write code that proves the order and which sides actually run for the logical operators. You’ll get some tips too.
If you listen carefully, you can hear the 1s and 0s flowing in your computer.
Total Lab Runtime: 01:07:16
- 1 Anatomy of a Conditional Expressionfree 04:58
- 2 Falsey Conditional Expressionbasic 09:15
- 3 Functions in the Conditional Expressionbasic 11:04
- 4 Assignment in the Conditional Expressionbasic 08:42
- 5 Operator Truth Tablesbasic 05:56
- 6 Logical Operator Experimentpro 13:21
- 7 Operator Precedence Experimentpro 14:00