Foundations-of-Computer-Science practice question 13 of 15

Which of the following best describes problem solving in computer science?

Full set: 71 questions
Answer options
A:

A. Analyzing a problem, designing a method, implementing it, and evaluating the result

Correct answer
B:

B. Skipping planning and writing code immediately every time

C:

C. Replacing all data with fixed values

D:

D. Using only one algorithm for every task

Correct Answer:
A. A. Analyzing a problem, designing a method, implementing it, and evaluating the result
Explanation

Problem-solving in computer science is a systematic process that involves several distinct stages. It begins with a thorough analysis to understand the problem's requirements and constraints. This is followed by the design phase, where an algorithm or a plan is developed to solve the problem. The plan is then translated into code during the implementation phase. Finally, the solution is tested and evaluated to ensure it is correct, efficient, and meets all requirements. This structured, iterative cycle is fundamental to creating robust and effective computational solutions.

Why Incorrect

B. Skipping planning and coding immediately is a poor practice that often leads to inefficient, buggy, and unmaintainable code for any non-trivial problem.
C. Replacing all data with fixed values (hardcoding) makes a program inflexible and unable to handle variable inputs, which is the opposite of a general problem-solving approach.
D. Using only one algorithm for every task is impractical and inefficient, as different problems are best solved by algorithms specifically designed for them.

References

1. Pólya, G. (1945). How to Solve It. Princeton University Press. This foundational work outlines a four-step problem-solving process (Understanding the problem, Devising a plan, Carrying out the plan, Looking back) that is widely adapted in computer science education.

2. Zelle, J. M. (2004). Python Programming: An Introduction to Computer Science. Franklin, Beedle & Associates. Chapter 1, "The Software Development Process," describes the process as a cycle of "Analyze, Design, Implement, Test/Debug," which directly maps to the correct answer.

3. MIT OpenCourseWare. (2011). 6.00SC Introduction to Computer Science and Programming, Spring 2011. Lecture 1, "Introduction," outlines the core components of computation: a language for expressing computations and a mechanical process for executing them, which implies a structured approach of design and implementation.

Scroll to Top