[Tutor] Fwd: Math Question
gerardo arnaez
garnaez at gmail.com
Wed Mar 23 03:47:43 CET 2005
On Tue, 22 Mar 2005 22:59:00 -0000, Alan Gauld <alan.gauld at freenet.co.uk> wrote:
> OK, No fancy math here, so thee might be a cleaner way, but here
> is how I'd do it.
>
Yikes.
Thanks for insight and solving it,
Btw, I bought your book a while ago and it was the first that
explained classes to me in a a a way I got it, by explaining exactly
what *self* stood for in all the examples.
All the other books just went on, and never even thought of explaining
leaving me for months in a dizzy on what the heck *self* meant in
making classes
Thanks for that and the help here
> > (Note the patient only has 5mg tabs, which they can split to make
> dose
> > adjust my 2.5)
>
> OK< so we are dealing with a unit size of 2.5mg. Convert the total
> dosage into 2.5mg units. 35mg = 35/2.5 = 14 units
>
> Divide the number of units by the number of days using integer
> division:
>
> divmod(14,7) -> 2,0
>
> that tells us you need 2 units per day and no adjustment
>
> Add 10% => 14 + 1.4 = 15.4 units. YOu must decide to either
> round up or down, lets say you round up to 16 units
>
> divide the doze as before
>
> divmod(16,7) -> 2,2
>
> that says 2 units per day and on 2 days an extra unit.
> (Which was your guestimate)
>
> If you rounded down to 15
>
> divmoid(15,7) -> 2,1
>
> which is 2 units/day and 1 day with an extra unit.
>
> > How would I solve this using math instead of geustimating it.
> > What kind of math am I talking about here?
>
> integer math with a hint of quantum techniques thrown in
>
> If the above didn't make sense just shout and we can explain
> in more detail.
>
> Alan G
> Author of the Learn to Program web tutor
> http://www.freenetpages.co.uk/hp/alan.gauld
>
>
More information about the Tutor
mailing list