Introduction
If-else expressions help your program choose between two paths based on a condition. This lets your program make decisions like a person would.
When you want to check if a number is positive or negative and do something different for each.
When you want to decide what message to show based on a user's age.
When you want to set a value depending on whether a condition is true or false.