Foundations-of-Computer-Science practice question 13 of 15
Which of the following best describes problem solving in computer science?
Full set: 71 questionsProblem-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.
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.
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.
Keep practicing
Take the free Foundations-of-Computer-Science practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Foundations-of-Computer-Science practice questions
- Question 1What is the purpose of a parameter in a function definition?
- Question 2What is the primary purpose of an operating system?
- Question 3Which action is taken if the first number is the lowest value in a selection sort?
- Question 4What will the expression fam[3:6] return?
- Question 5What will the output be of this line?
- Question 6Which aspect is excluded from a NumPy array’s structure?
