A person has the Capability of thinking 100 lines of code in 5 minutes and can type 100 lines of code in 10 minutes. He takes a break for 5 minutes after every 10 minutes. How many lines of codes will he complete typing after an Hour??
Answers
Solution:-
Given:-
A person has the Capability of thinking 100 lines of code in 5 minutes.
And can type 100 lines of code in 10 minutes.
Let's solve this Question Logically.
Given that He takes a break for 5 minutes after every 10 minutes.
Now,
Let's Break 1 Hour in parts , each one of 5 minutes.
=) 1 Hour = 12 × 5 minutes.
▪ (1)For First 5 minutes, he will definitely think.
▪(2)For Next 5 minutes, he will type.
▪(3)For Next 5 minutes, He will take Rest.
▪(4)For Next 5 minutes, He will Type. [ Bcoz It's Given that he can write for 10 minutes, if he think for 5 minutes. And He has taken 5 minutes to think. So, He will Type.]
▪(5)For Next 5 minutes, he will think. [ Bcoz if he thinks for 5 minutes he can only type upto 10 minutes. ]
▪(6) For Next 5 minute, He will take rest. [ He is taking Rest after every 10 minutes. ]
▪(7) For Next 5 minutes, He will type.
▪(8) For Next 5 minutes, He will continue Typing. [As he can type upto 10 minutes.]
▪(9) For Next 5 minutes, He will Take Rest. [ As 10 minutes are over .]
▪(10) For Next 5 Minutes, He will think.
▪(11) For Next 5 Minutes, He will Write.
▪(12) For Next 5 Minutes, He will take Rest. [ As he has worked for 10 minutes. ]
Now, 1 Hour is Over.
Let's Count For how many parts of 5 minutes, he was Typing.
He was Typing in ;
He was Typing in ;(2) , (4), (7), (8), (11)
Total Amount of Time in which he was Typing = 5 × 5 = 25 minutes.
Now,
He can type 100 lines of code in 10 minutes.
Then in 25 minutes, He can type upto
=) 100/10 × 25
=) 10 × 25
=) 250.
Hence,