Introduction
An if statement helps your program make choices by running code only when a condition is true.
To check if a user is old enough to access a website.
To decide if a number is positive or negative.
To turn on a light only when it is dark.
To give a discount if a customer buys more than 5 items.