Patrick B. answered 02/01/19
Math and computer tutor/teacher
This is not going to work....
The bank gives $3 reward each month when the card is used
for a SINGLE PURCHASE of $50 or more.
You cannot base this function on the total of the purchases...
For example, I can make the following purchases:
$20
$25
$20
$25
$20
$30
$25
$20
$40
$20
$25
$30
The total of these purchases is $300. But I do not deserve a
single reward for these purchases because ALL of them are
less than $50.
If you want it to be based on the total of the purchases, then you
MUST REWRITE the rule. It should say "A local bank has a debit card
that gives $3 reward each month FOR EVERY $50 WORTH OF PURCHASES"
In that case, the function is:
y = INT(x / 50) * 3 where x is the total of the purchases and the INT() function
returns the integer portion of the division and throws away the fraction.
EX. If the total of the purchases is X=$275, then y = INT(275/50) * 3
= INT( 5.5) * 3
= 5 * 3
= 15
Otherwise, you have to REDEFINE x to be a SINGLE purchase. In that case, the
function is
y = {
3 if x>=50,
0 otherwise
}
I'm sorry it is so complicated.
I hope you understand the difference.