Operators & Expressions

I will show you how to perform calculations and make decisions. You will learn arithmetic, comparison, and logical operators.

52 lessons
204 min

Lessons

1. Intro

The Goal

4m

2. What is an Operator?

Operators transform values

4m

3. Arithmetic Operators Overview

Basic math operations

4m

4. Addition and Subtraction

Combining and removing values

4m

5. Multiplication

Scaling values

4m

6. Quiz: Basic Operations

Math operators

2m1 problems

7. Division with Integers

Whole number results only

4m

8. Division with Doubles

Full decimal answers

4m

9. Quiz: Integer division

Integer division

3m1 problems

10. The Modulo Operator

What is left over

4m

11. Modulo Use Cases

Practical applications

4m

12. Quiz: Modulo

Test modulo knowledge

3m1 problems

13. Operator Precedence

Which operator goes first

4m

14. Using Parentheses

Override default precedence

4m

15. Quiz: Precedence

Test precedence rules

3m1 problems

16. Assignment Operators

The equals sign

4m

17. Challenge: Even or Odd

Use the modulo operator

5m1 problems

18. Compound Assignment

Shorthand arithmetic

4m

19. Increment and Decrement

Add or subtract one

4m

20. Pre vs Post Increment

Timing of the change

4m

21. Quiz: Operator basics

Operator basics

3m1 problems

22. Quiz: Assignment

Test your understanding

3m1 problems

23. Challenge: Maximum of Two

Compare two values

5m1 problems

24. Comparison Operators Overview

Testing conditions

4m

25. Equal and Not Equal

Checking sameness

4m

26. Less Than and Greater Than

Ordering values

4m

27. Less/Greater or Equal

Inclusive bounds

4m

28. Quiz: Operator basics

Operator basics

3m1 problems

29. Quiz: Comparison

Test comparison rules

3m1 problems

30. Logical Operators Overview

Merging multiple checks

4m

31. Logical AND

All conditions required

4m

32. Quiz: Logical AND

Logical AND

3m1 problems

33. Logical OR

Any condition sufficient

4m

34. Logical NOT

Flipping true and false

4m

35. Quiz: Logical AND

Logical AND

3m1 problems

36. Short-Circuit Evaluation

Early exit optimization

4m

37. Quiz: Logical Operators

Test logical rules

3m1 problems

38. Problem - Check Even or Odd

Apply remainder operator

4m1 problems

39. Problem - Leap Year Check

Multiple logical rules

4m1 problems

40. Problem - Next Round

Count qualifiers

4m1 problems

41. Next Round - The Idea

The threshold condition

4m

42. Next Round - Algorithm

Breaking down the solution

4m

43. Quiz: Operator basics

Operator basics

3m1 problems

44. Next Round - Implementation

Complete solution

7m1 problems

45. Lessons from Next Round

summary

4m

46. Problem - Beautiful Year

Finding distinct digits

4m1 problems

47. Beautiful Year - The Idea

Using modulo and division

4m

48. Beautiful Year - Algorithm

Breaking down the solution

5m

49. Quiz: Conditional execution

Conditional execution

3m1 problems

50. Beautiful Year - Implementation

Complete solution

7m1 problems

51. Lessons from Beautiful Year

summary

4m

52. Section Recap

What we learned

5m

Ready to start learning?

Access all 52 lessons with interactive content and progress tracking.