##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
I will show you how to perform calculations and make decisions. You will learn arithmetic, comparison, and logical operators.
The Goal
Operators transform values
Basic math operations
Combining and removing values
Scaling values
Math operators
Whole number results only
Full decimal answers
Integer division
What is left over
Practical applications
Test modulo knowledge
Which operator goes first
Override default precedence
Test precedence rules
The equals sign
Use the modulo operator
Shorthand arithmetic
Add or subtract one
Timing of the change
Operator basics
Test your understanding
Compare two values
Testing conditions
Checking sameness
Ordering values
Inclusive bounds
Operator basics
Test comparison rules
Merging multiple checks
All conditions required
Logical AND
Any condition sufficient
Flipping true and false
Logical AND
Early exit optimization
Test logical rules
Apply remainder operator
Multiple logical rules
Count qualifiers
The threshold condition
Breaking down the solution
Operator basics
Complete solution
summary
Finding distinct digits
Using modulo and division
Breaking down the solution
Conditional execution
Complete solution
summary
What we learned