Difficulty: Easy
Correct Answer: Both what is to be calculated and how to calculate it
Explanation:
Introduction / Context:
Algorithms serve as unambiguous blueprints for computation. For developers and reviewers to implement and test reliably, the algorithm must specify the target quantity (what) and the method (how) using precise operations, order of evaluation, and any constraints or edge-case rules. Omitting either dimension leads to misinterpretation.
Given Data / Assumptions:
Concept / Approach:
Good pseudocode (structured English) states the objective and the computation steps. For example: “Compute net_pay = gross_pay - (tax + provident_fund).” This line conveys both what (net_pay) and how (explicit arithmetic). Including only one of these aspects would be insufficient.
Step-by-Step Solution:
Identify the requirement of calculation clarity: target + method.Check options for one that includes both elements.Option C matches both what and how; select it.
Verification / Alternative check:
Attempting to code from an algorithm that states only the goal (what) forces the programmer to invent a method, risking inconsistency. Conversely, describing only steps (how) without a clear target can misalign outputs. Therefore, both are necessary.
Why Other Options Are Wrong:
Options A and B omit essential information. Option D introduces “why,” which is useful contextually but is not required in the calculation instruction itself. Option E is invalid because a correct option exists (C).
Common Pitfalls:
Leaving operator precedence or units implicit; always specify order and unit conversions to prevent defects.
Final Answer:
Both what is to be calculated and how to calculate it
Discussion & Comments