Module 2 of 4

Operators and Control Structures

8 lessons  ·  Operators, conditionals, loops

1

Assignments and Arithmetic Operators

Topics covered

  • Assignment operator and compound assignments (+=, -=, *=, /=)
  • Arithmetic operators: +, -, *, /, %
  • Integer vs floating-point division
  • Operator precedence
2

Other Common Operators

Topics covered

  • Increment and decrement operators (++, --)
  • Relational operators: ==, !=, <, >, <=, >=
  • Logical operators: &&, ||, !
  • The ternary operator
5

while Iteration Statement

Topics covered

  • Structure and syntax of while loops
  • Loop conditions and termination
  • Infinite loops and how to avoid them
6

do-while Iteration Statement

Topics covered

  • Structure and syntax of do-while loops
  • Difference between while and do-while (guaranteed first execution)
  • Input validation use case
7

for Iteration Statement

Topics covered

  • Structure of for loops: initialisation, condition, increment
  • Counting loops and iteration patterns
  • Range-based for loops