Chapter 4 Notes Problem Solving
Chapter 4 Notes Problem Solving
CHAPTER 4
INTRODUCTION TO PROBLEM SOLVING
1. What is the first step in problem-solving as per the document?
A) Testing the solution B) Coding the algorithm
C) Analyzing -the problem D) Debugging the program
Answer: C) Analyzing the problem
2. What is an algorithm?
A) A set of exact steps to solve a problem B) A programming language
C) A type of computer hardware D) A method of debugging
Answer: A) A set of exact steps to solve a problem
3. Which of the following is NOT a characteristic of a good algorithm?
A) Precision B) Uniqueness C) Infinite steps D) Finiteness
Answer: C) Infinite steps
5. What does the process of 'coding' involve?
A) Writing an algorithm B) Testing the program
C) Converting the algorithm into a format understood by the computer D) Debugging the code
Answer: C) Converting the algorithm into a format understood by the computer
6. What shape is used to represent a process in a flowchart?
A) Parallelogram B) Rectangle C) Diamond D) Circle
Answer: B) Rectangle
7. In a flowchart, which symbol represents the start or end?
A) Diamond B) Rectangle C) Oval D) Parallelogram
Answer: C) Oval
8. What is the purpose of developing an algorithm before writing code?
A) To debug the program B) To convert it into machine language
C) To have a clear solution plan D) To test the program
Answer: C) To have a clear solution plan
10. Which of the following is an essential skill for a computer science student?
A) Problem solving B) Debugging C) Coding D) All of the above
Answer: D) All of the above
15. Which of the following steps is NOT part of the problem-solving process mentioned in the
document?
A) Analyzing the problem B) Developing an algorithm
C) Compiling the code D) Testing and debugging
Answer: C) Compiling the code
22. Which programming language can be used to write a program after developing an algorithm?
A) Only Python B) Any high-level language C) Only Java D) Only C++
Answer: B) Any high-level language
28. Which step in problem-solving involves identifying the logical steps to reach a solution?
A) Analyzing the problem B) Developing the algorithm
I PUC CS CHAPTER 4 TRISHA VIDYA COLLEGE,KATPADY
33. What should be the next step if an algorithm is not producing the correct output?
A) Ignoring the error B) Rewriting the problem statement
C) Revising the algorithm to check for logical errors D) Converting it into a flowchart
Answer: C) Revising the algorithm to check for logical errors
2. What is pseudocode?
Ans: It is a detailed description of instructions that a computer must follow in a particular order.
Ans: A flowchart's purpose is to visually represent a process or workflow, and to help you understand
how it works
4. How can you improve an algorithm that fails for certain inputs?
Ans:
1. Read and understand the problem.
2. Analyze and optimize the problem-solving process.
3. Think and plan your solution. ...
4. Code and test your solution
3. Write a detailed algorithm to determine the calculate addition, subtraction and multiplication of two
numbers.
Ans: Step 1: START
Step 2: Read the value for num1, num2
Step 3: Compute add = num+num
Step 3: Compute sub = num-num
Step 3: Compute mul = num*num
Step 4: Display Addition of two values is add
Step 4: Display Subtraction of two values is sub
Step 4: Display Multiplication of two values is mul
Step 5: Stop
5. Write the pseudocode and draw the flowchart for calculating the area and perimeter of a rectangle.
Ans: Step 1: START
Step 2: INPUT Len, Width
Step 3: Compute area = len*Width
Step 4: Compute perimeter =2( len+Width)
Step 4: OUTPUT area, perimeter
Step 5: Stop