Choose the correct answers to the questions from the given options. (Do not copy the questions, write only the correct answers.)
Assertion (A): A clock is a real-life example of nested loops. Reason (R): The hour hand moves through 12 positions, while the minute hand moves through 60 positions within each hour.
Topic: Nested loops
Try it
Pick an option and check your answer. The full worked answer is below either way.
Answer
(a) Both (A) and (R) are true and (R) is a correct explanation of (A)..
The clock is the standard illustration of a nested loop: for every one move of the hour hand (outer loop, 12 positions) the minute hand completes a full 60 positions (inner loop). The inner loop runs completely for each single pass of the outer one, which is exactly what nesting means — and the reason states that relationship, so it explains the assertion. Total inner runs: 12 x 60 = 720.
Both (A) and (R) are true and (R) is a correct explanation of (A)..