A software engineer has the capability of thinking 100 lines of code in five minutes and...
Palo Alto Networks technical mcq question, verified with a worked answer. Free to practise - no sign-up.
A software engineer has the capability of thinking 100 lines of code in five minutes and can type 100 lines of code in 10 minutes. He takes a break for five minutes after every ten minutes. How many lines of codes will he complete typing after an hour?
Select any one of the following
Show answer & explanation
North 20m and South 20m cancel out to 0 in the vertical axis. West 40m and another West 20m add up to 60m west. The distance is 60m.
Step-by-step Derivation:
Step 1: Start at (0, 0). Walk 20m North -> position (0, 20).
Step 2: Turn left (West) and walk 40m -> position (-40, 20).
Step 3: Turn left (South) and walk 20m -> position (-40, 0).
Step 4: Turn right (West) and move 20m -> position (-60, 0).
Step 5: Distance from origin = sqrt((-60)^2 + 0^2) = 60m.