Introduction
If-else helps your program choose what to do based on conditions. It makes decisions like you do in real life.
Deciding if a user can log in based on password correctness.
Checking if a number is positive, negative, or zero.
Choosing a message to show based on the time of day.
Turning on a light if it is dark outside.
Giving discounts only if a customer buys more than 5 items.