Thursday, March 8, 2012

A little riddle?

I am sure you have all seen riddles like:
3 men eat out, the bill is R300, they split it R100 each + pay cash. The waiter comes back and says the meal only comes to R250, so gives each a R10 back and keeps R20 as a tip. So each man pays R90. 
R90 x 3 = R270 and R270 + R20 = R290. Where did the other R10 go?
There is a good explanation on http://www.answerbag.com/q_view/103886

The mathematics can confuse you if you add numbers that are not supposed to be added or work out percentages on the incorrect amounts:
In activity 6 of Module 1_3 the user is asked to type in the final amount the group at a restaurant is willing to spend on (foodAndDrink + TIP + VAT) and the program is supposed to calculate what the foodAndDrink without the VAT and TIP  should be.  We normally calculate the VAT on foodAndDrink and the 10% TIP on the bill that includes VAT and foodAndDrink

foodAndDrink + 14%*  foodAndDrink +  10%* (food and drink+ 14%* foodAndDrink )    = totalBill
foodAndDrink  +  VAT             +  TIP                                             = totalBill

SAY foodAndDrink = X
X                     + 0.14*X          + 0.1*(X*1.14)                               = totalBill
X                     + 0.14*X          + 0.114*X                                     = totalBill
                                      X(0.114+0.14+1)                                   = totalbill
                                                       X(1.254)                              = totalBill
Therefore                                                                         X        = totalBill/(1.254)

If you say the tip = totalBill/1.1 you are working with 10% of the totalbill
instead of 10% of the foodAndDrink and VAT and the ratio will give incorrect answers and similarly the VAT is not equal to totalBill/1.14

The scratch solution can also look like this:
when green flag clicked
        ask "What should your final bill be?" and wait
        set "FinalBill" to (answer)
        set "AfterTip" to ((FinalBill) / 1.1)
        set "AfterVAT" to ((AfterTip) / 1.14)
        say (join "R " (AfterVAT)) for 2 secs.  (LilanĂ© le Grange, Fourways High School)

No comments:

Post a Comment