English
Topic 2. Data types, variables, null safety, operations, and control flow constructs
Goal: learn to validate numeric input, use nullable types, conditional expressions, and loops, and justify boundary cases.
Lecture contents
- Values, types, and conversions — Values, variables, and types · Basic types and number representation · Conversions and overflow
- Null safety and special types — Nullable types and safe input · Any, Unit, Nothing, and type checking
- Operations and branching — Arithmetic, equality, and logical operations · if as an expression · when and exhaustive branching
- Ranges and loops — Ranges and the for loop · while, do-while, and loop termination
- Contracts and boundary checks — Contracts and boundary checks