manukumar wrote:

A software programmer does 20% of the work in 80% of the time, and 80% of the work in the remaining 20% of the time. If the code he writes is X lines long and he was given one month (30 days) to accomplish the task, then, assuming that the programmer works at a constant rate in each of the two stages, How many lines of code were written in the last two weeks, in terms of X?

1) 13x/15

2) 7x/15

3) 7x/60

4) 2x/3

5) x/2

Pick nos. Take x = 60

1st stage -> 20% of the work in 80% of the time

So 20% of 60 = 12

and 80% of 30 (nos of days) = 24

So he writes 12 lines of code in 1st 24 days 2nd stage -> 80% of the work in the remaining 20% of the time

so he writes 48 lines of code in last 6 days.The 2 boldface are your rates.

In the last 14 days comprises of both the stages.

in the 1st 8 days he writes at the rate of\(\frac{12}{24} \frac{lines}{days}\) so he writes 4 lines ( \(8 * \frac{12}{24}\))

in the last 6 days he writes at the rate of\(\frac{48}{6}\) lines / days so he writes 48 lines (\(6 *\frac{48}{6}\))

totally he writes 52 lines. This is the final value / target value.

Substitute X = 60 and check which one results in 52.

Only option A gives 52 when x = 60.

Cheers