Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL exam question

Re: PL/SQL exam question

From: Mark D Powell <markp7832_at_my-deja.com>
Date: 2000/04/10
Message-ID: <8cskon$s2q$1@nnrp1.deja.com>#1/1

In article <8crr36$m0t$1_at_ctb-nnrp1.saix.net>,   "Billy Verreynne" <vslabs_at_onwe.co.za> wrote:
> vsanker_at_yahoo.com wrote in message <8cq0ss$3hs$1_at_nnrp1.deja.com>...
> >
> >WHILE v_price < &&p_count LOOP
> > v_amount:=v_amount + 1;
> > v_price:=v_amount*&&p_pct_increase;
> >END LOOP;
> >
> >If V_PRICE is 45, P_COUNT is 75, and V_AMOUNT is 5, which
 P_PCT_INCREASE
> >value would cause the loop to terminate ?
>
> In the previous loop itteration (from which the supplied values were
 given):
> 45 = 5 * pct_increase
> p_pct_increase - 45 /5 = 9
>
> But this tells us nothing about the p_pct_increase.
>
> OK, for this loop itteration which must cause the loop to be
 terminated.
>
> v_price (45) < p_count (75) : means that the loop is executed.
>
> v_amount = 5 + 1 = 6
>
> v_price = 6 x p_pct_increase
> where v_price > p_count
>
> p_count is 75, thus let us assume that v_price must be 76 in order to
> satisfy the greater than condition.
>
> 76 = 6 x p_pct_increase
>
> p_pct_increase = 76 / 6 = 12.66667
>
> Thus, any value of larger than a percentage increase of 12.6, will
 cause
> v_price to be larger than p_count.
>
> >A. 0
> >B. 15
> >C. 20
> >D. 45
> >E. 75
>
> B is the answer.
>
> >I think it is 15 but the answer is 20.
>
> Sez who? Assholes who can not program? Or do I have both my feet in
 my mouth
> and my leadpipe wrapped around my head with this one?
>
> It seems to me that 15 is the right answer. Amount is 6 and you need
 to
> multiply it with a value that gives you a total that is larger than
 75. Any
> integer from 13 up will give you that.
>
> Billy
>

I have a friend whose shop had the money to buy their people the self- test software, and after talking to him and looking up a few facts for him I believe that there are numerous errors in the self-test answers. The tests themselves seem to be of a much higher quality.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Apr 10 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US