Teo Petralia wrote:
> 
> Hi!
> I would like to find out the price of an item or better a number of
> this items accordingly to their weight.
> In other words looking at the table below:
> 
> 0.5kg = $49.00
> 1kg = 63.70
> 1.5kg = 78.35
> 2kg = 93.00
> 5kg = 165.45
> 10kg = 275.00
> 15kg = 375.10
> 20kg = 468.45
> 
> how can I know the price of an order that weight 3kg or and order
> that weight 12.3kg.

Interesting.
These prices aren't linear versus the weights.

I'm guessing that these are price-break points ("If you order this much,
we'll give you a break on the price, if you order this much more, we'll
give you this even better break)

If that's the case, the question is:
Would a 7kg item cost 7/5 of what a 5kg item costs? or would it be 7/10
of the 10kg item?

I would expect (using these numbers) the 3kg item would cost 1.5 times
what the 2kg item cost (139.50), and 4kg would cost more than 5kg
(186!!). That's how it works when I buy rivets.

make a property list* of the weights with their price per kilo
find where in the list your order weight would be
get the price per kilo from the next lower weight and multiply it by the
order weight

*or two parallel lists, one of weights, one of prices per kilo. Whatever
works better in your head.

-- 
Carl West    [EMAIL PROTECTED]
617.262.8830 x246    

I have no superfluous leisure; my stay must be
stolen out of other affairs; but I will attend you awhile.

           - Isabella, Measure for Measure, Act 3 Scene 1

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to