9th Class Computer Science Notes 2026 — Chapter 2 – Federal Board

Download PDF
 

Class 9 Computer Science – Chapter 2: Computational Thinking and Algorithms

Board: Federal Board (FBISE)

Section I: Multiple-Choice Questions (MCQs)

1. For a problem we face in real-world situations, in what sequence do we follow the steps?

a) I, II, III
b) I, III, II
c) II, I, III
d) II, III, I

Correct Answer: c) II, I, III

2. Which of the following are types of computing problems?

a) I and II
b) I and III
c) II and III
d) I, II, and III

Correct Answer: d) I, II, and III

3. What is computational thinking?

a) Programming
b) Thinking like a computer
c) Coding
d) Logically solving problems

Correct Answer: d) Logically solving problems

4. To solve search problems, we need to:

a) Provide the moves.
b) Provide the starting state.
c) Provide the end state.
d) All of the above.

Correct Answer: d) All of the above.

5. The Eight Queens Puzzle is the problem of:

a) Sorting
b) Searching
c) Counting
d) Both sorting and searching

Correct Answer: b) Searching

6. Finding the location of an element with a given value is called:

a) Search
b) Traversal
c) Sort
d) None of the above

Correct Answer: a) Search

7. What does IPO stand for in IPO charts?

a) Input, Plan, Output
b) Input, Program, Output
c) Input, Process, Output
d) Input, Proceed, Output

Correct Answer: c) Input, Process, Output

Section II: Short Response Questions (SRQs)

1. What is the major difference between solving simple problems and complex problems?

Simple problems can be solved directly using straightforward steps and minimal planning. Complex problems require breaking them down into smaller, manageable sub-problems using decomposition and abstraction. This structured approach helps manage complicated details and ensures accurate solutions.

2. Why do software designers prefer to use IPO charts?

IPO (Input-Process-Output) charts provide a clear visual layout of how data enters a system, what transformations occur, and what results are produced. They help programmers organize program logic before writing actual code, reducing errors and saving development time.

3. Differentiate between computational thinking and logical thinking.

Logical thinking is a general reasoning process in which a person follows steps to reach a valid conclusion based on given facts.

Computational thinking specifically applies computer science principles, such as decomposition, pattern recognition, abstraction, and algorithm design, to develop solutions that can be executed by humans or machines.

4. Write four properties of computational thinking.

The four core properties of computational thinking are:

  1. Decomposition: Breaking a complex problem into smaller parts.

  2. Pattern Recognition: Identifying similarities and patterns.

  3. Abstraction: Filtering out irrelevant details and focusing on important information.

  4. Algorithm Design: Developing step-by-step instructions to solve a problem.

Together, these techniques enable efficient problem-solving across different areas.

5. What are the methods used to design a solution?

Common methods used to design a solution include:

  • Flowcharts

  • Pseudocode

  • Algorithms

  • IPO charts

These tools help developers organize program logic visually or textually before implementing it in a programming language.

6. Which computational thinking technique breaks down a problem into smaller parts?

Decomposition is the computational thinking technique used to break down a large, complex problem into smaller, manageable, and independent sub-problems. This makes troubleshooting and designing solutions for individual parts easier.

7. Identify three computing problems from other subjects that you are studying in your class.

  1. Physics: Calculating projectile motion equations using algorithmic steps.

  2. Biology: Analyzing genetic probability ratios using Punnett squares, counting, and combinatorics.

  3. Language Studies: Translating grammatical sentence structures into syntax rules.

8. Why do we need to think computationally?

Computational thinking equips us with structured problem-solving skills to tackle complex real-world challenges efficiently. It allows us to automate repetitive tasks, design logical algorithms, and develop solutions that both humans and computers can process effectively.

9. Telephone numbers usually have 9 digits. Out of these 9 digits, the first two represent the area code and remain constant within a given area. The last 7 digits represent the number, and it cannot begin with 0. How many different telephone numbers are possible with a given area code?

The last seven digits represent the telephone number. The first digit cannot be 0, so it has 9 possible choices (1–9). Each of the remaining six digits can be any digit from 0 to 9, giving 10 choices for each.

Using the multiplication rule:

\[ 9 \times 10 \times 10 \times 10 \times 10 \times 10 \times 10 \]
\[ =9\times10^6=9,000,000 \]

Therefore, 9 million different telephone numbers are possible with a given area code.

10. From city A to city B, there are 4 different roads, and from city B to city C, there are 2 different roads. Draw a map of the given situation and identify how many possible routes someone can follow to reach city C from city A through city B.

According to the multiplication rule of counting:

  • Number of roads from A to B = 4

  • Number of roads from B to C = 2

Total possible routes:

\[ 4\times2=8 \]

Therefore, there are 8 different possible routes from city A to city C through city B.

Section III: Extended Response Questions (ERQs)

Q1. Identify whether the given problems are Decision Problems, Counting Problems, or Search Problems.

a. Does a given binary string have an even number of zeros?

Decision Problem

b. Flipping a coin results in Heads or Tails. If I flip a coin 20 times, how many different sequences of Heads and Tails are possible?

Counting Problem

Each flip has two possible outcomes. Therefore:

\[ 2^{20}=1,048,576 \]

c. Does a certain Java program say “yes” to an empty input?

Decision Problem

d. How many ways can the letters of the word TRIANGLE be arranged?

Counting Problem

The word TRIANGLE contains 8 distinct letters.

\[ 8!=8\times7\times6\times5\times4\times3\times2\times1 \]
\[ =40,320 \]

e. N-Queens Problem: The goal is to place eight queens on a chessboard so that no queen attacks any other.

Search Problem

Q2. A student has to take one course of Physics, one of Science, and one of Mathematics. In how many ways can this student select the three courses?

Solution:

According to the Fundamental Counting Principle (Multiplication Rule), the total number of combinations is the product of the choices in each category.

  • Physics choices = 3 (\(P_1,P_2,P_3\))

  • Science choices = 2 (\(S_1,S_2\))

  • Mathematics choices = 2 (\(M_1,M_2\))

Total combinations:

\[ 3\times2\times2=12 \]

Therefore, the student can select the three courses in 12 different ways.

List of 12 Combinations:

No.

Combination

1

\((P_1,S_1,M_1)\)

2

\((P_1,S_1,M_2)\)

3

\((P_1,S_2,M_1)\)

4

\((P_1,S_2,M_2)\)

5

\((P_2,S_1,M_1)\)

6

\((P_2,S_1,M_2)\)

7

\((P_2,S_2,M_1)\)

8

\((P_2,S_2,M_2)\)

9

\((P_3,S_1,M_1)\)

10

\((P_3,S_1,M_2)\)

11

\((P_3,S_2,M_1)\)

12

\((P_3,S_2,M_2)\)

Q3. Create an IPO chart that accepts the ages of four boys and calculates their total age and average age.

IPO Chart:

Input

Process

Output

Accept the ages of four boys: \(age1, age2, age3, age4\)

1. Calculate total age: \(Total=age1+age2+age3+age4\)

Display Total and Average

 

2. Calculate average age: \(Average=Total/4\)

 

Q4. Create an IPO chart for a situation that allows a user to enter two numbers and select an operation (+, −, ×, ÷) to get the output.

IPO Chart:

Input

Process

Output

Enter two numbers (\(num1,num2\)) and an operator (\(op: +,-,*,/\))

If \(op=’+’\), then \(Result=num1+num2\)

Display calculated Result

 

If \(op=’-‘\), then \(Result=num1-num2\)

 
 

If \(op=’*’\), then \(Result=num1\times num2\)

 
 

If \(op=’/’\) and \(num2\neq0\), then \(Result=num1/num2\)

 

Q5. A child wants to plan a birthday party for their friend.

a) Create an IPO chart for this situation.

Input

Process

Output

Guest list, budget, venue preference, date/time, and menu items

1. Allocate the budget among food, decorations, and venue.

Party plan and schedule

 

2. Send invitations and track RSVPs.

Final shopping list

 

3. Finalize food orders and schedule activities.

Invitation confirmation summary

b) Explain the properties of computational thinking used in this situation.

1. Decomposition

Breaking the party planning process into separate tasks, such as invitations, food arrangements, venue booking, and decorations.

2. Pattern Recognition

Using information from previous parties to estimate the number of guests and the required quantity of food.

3. Abstraction

Focusing on important factors, such as the budget and guest list, while initially ignoring minor details.

4. Algorithm Design

Creating a step-by-step checklist and timeline to organize all tasks leading up to the event day.

 

Notes by Sir Dilawar

For more notes, visit QuranEducationPoint.com