
4
Working with
Conditions
I
n many situations, one or more conditions determine the
final result of a calculation or a task. For example, a business
might have a rule for giving a discount if a customer makes
purchases of over a certain preset amount. In a case like this, we
must first check whether the discount is applicable or not before
calculating the final amount owed by the customer. If no discount
is applicable then we have one answer and if a discount is applicable
then we have another answer. If we add another condition, say
whether the customer is a member of a certain club or not, then
the number of possible answers increases