Introduction
An if statement helps your program make choices by running code only when a condition is 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 perform an action only if a sensor detects something.
To give a discount only if the customer buys more than 5 items.