if-else Statement
An if...else statement works on the following principle:
- Execute the block of code inside the
ifstatement if the expression evaluates toTrue. After execution, return to the code outside theif...elseblock. - Execute the block of code inside the
elsestatement if the expression evaluates toFalse. After execution, return to the code outside theif...elseblock.

Example:
applePrice = 210
budget = 200
if applePrice <= budget:
print("Alexa, add 1kg Apples to the cart.")
else:
print("Alexa, do not add Apples to the cart.")Output:
Alexa, do not add Apples to the cart.