Introduction
An if-else statement helps your program make choices. It runs one set of instructions if a condition is true, and another set if it is false.
Deciding if a user is old enough to access a website.
Checking if a number is positive or negative.
Choosing what message to show based on the time of day.
Turning on a light if it is dark outside.
Giving a discount if a customer buys more than 5 items.