Introduction
An if statement helps your program make choices by running code only when certain conditions are true.
To check if a user entered the correct password before allowing access.
To decide if a number is positive or negative and print a message.
To run a special offer only if a customer buys more than 5 items.
To check if a file exists before trying to open it.