What a Conditional Is and What Problem It Solves
A conditional lets the program adapt its behavior instead of always following one fixed path.
If the age is high enough, allow access. If not, block it. If a grade reaches the minimum, pass the student. If not, fail them. This idea of alternative paths appears everywhere in programming.
The important part is not only learning a keyword. It is understanding that the program is reading a condition and choosing one branch of the flow.
- First a condition is evaluated.
- Then the program decides which block to execute.
- Only one of the planned paths continues.