9 Class Chapter No 02
9 Class Chapter No 02
Q.1: What is the major difference in solving simple problems and complex problems?
Ans: The major difference between solving simple problem and complex problem is; While
solving complex problem decompose the problem means to make sub problems that
are manageable and identify potential plans for each sub problem and rest of the
steps are same in simple and complex problems.
1. Flowchart
2. Concept Maps
Q.6: Which computational thinking technique breaks down the problem into smaller
parts?
Ans: Decomposition is the technique that breaks down a complex problem or system into
smaller parts that are more manageable and easier to understand. The smaller parts
can then be examined and solved, or designed individually, as they are simpler to
work with.
Q.7: Identify 3 computing problems from other subjects that you are studying in your
class.
Q.9: The telephone numbers usually have 9 digits. Out of these 9, the first two digits
represent the area code and are it remained 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?
Ans: The telephone numbers in a certain country have 9 digits. The first 2 digits are the
area code (03) and are the same within a given area.
Hence, the total number of 7 digit numbers that do not begin with 0 = 107 - 106 =
9000000.
Since, the first 2 digits are same within a given area
Therefore, the number of different telephone numbers that are possible within a
given area code in this country is 9000000.
Q.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 given situation and identify how many possible
routes are there that someone can follow to reach from city A to city C by passing
by city B?
Ans: City A to City B (4 Roads); City B to City C( 2 Roads)
So, Number of possible routes from City A--- >City B--- > City C are 4X2=8
Q.11: To buy a computer system, a customer can choose one of 4 monitors, one of 2
keyboards, one of 4 computers and one of 3 printers. Determine the number of
possible systems that a customer can choose from.
Ans: If we have to select r items from a total of n items then no. of ways for doing that is
given by nCr.
No. of options the customer has to choose from
4
C1x 2C1x 4C1 x 3C1= 4x2x4x3=96
Muhammad Sikandar Dar, Assistant Professor, IMCB, G-11/1, Islamabad
Give Long answers to the following Extended Response Questions (ERQs).
Q.1: Identify whether the given problems are Decision Problem, Counting problem or
search problem. Write your answer in front of each problem given below:
Ans:
b) Flipping a coin result in Head or Tails. I flip a coin 20 times, how many different
sequences of heads and tails are possible?
Ans: The number of sequences of heads and tails possible when flipping a coin 20 times
can be calculated using the formula 2^n, where n is the number of times the coin is
flipped. In this case, 2^20 = 1,048,576 possible sequences.
e) N-queens problem: Where the goal is to place eight queens on a chessboard such
that no queen attacks any other.
Q.2: A student has to one course of physics ,one of science and one of mathematics. He
may choose one of 3 physics courses(P1, P2, P3), one of 2 science courses(S1, S2)
and one of 2 mathematics course(M1, M2). In how many ways can this student
select the 3 courses he has to take?
Ans: Multiply the number of choices for each subject to find the total number of
combinations. So, the calculation is 3×2×2
Perform the multiplication to get the total number of combinations. 3×2×2=12.
Therefore, there are 12 different course combinations of Physics, Science, and Math.
Muhammad Sikandar Dar, Assistant Professor, IMCB, G-11/1, Islamabad
Q.3: Create an IPO chart which will accept the ages of four boys and calculate their total
age and average age. The program must display both the total and average age.
Ans: IPO chart.
Input Process Output
Take values Add four ages Total age
Ag1=18, Ag2=20, Sum= Sum
Ag3=25, Ag4=22 Ag1+Ag2+Ag3+Ag4 Average age
Calculate average of Avg
their ages
Avg=Sum/4
Q.4: Create an IPO chart of scenario that allows a user to enter in Two numbers. The
operation to be performed is either addition, subtraction, multiplication or division
and accordingly the output should be given to the user.
Ans: IPO chart.
Similarly, when baking a cake, a model cake wouldn’t be a specific cake, like a sponge cake
or a fruit cake. Instead, the model would represent all cakes. From this model we can learn
how to bake any cake, using the patterns that apply to all cakes.
Once we have a model of our problem, we can then design an algorithm to solve it.
1.What is an algorithm?
Patterns and trends used to solve a problem
A set of step-by-step instructions to resolve a problem
A programming language
2.What are algorithms used for?
To plan out the solution to a problem
As a platform to program a solution
To test a solution to a problem
3.How can an algorithm be represented?
As a flowchart
As pseudocode
As a flowchart or pseudocode
4.What is a flowchart?
A diagram that represents a set of instructions
A high-level language that has specific syntax
A way of describing a set of instructions that doesn’t use specific syntax
5.What is the correct symbol for a process instruction in a flowchart?
A rectangle
A parallelogram
A square
6.What is the correct symbol for an input in a flowchart?
A parallelogram
A rectangle
A square
7.What is the correct symbol for an output in a flowchart?
A parallelogram
A rectangle
A diamond
8.What links each instruction in a flowchart?
A line
A double line
An arrow
9.What is the correct symbol for a decision in a flowchart?
A rectangle
A diamond
A square
Muhammad Sikandar Dar, Assistant Professor, IMCB, G-11/1, Islamabad
10.What is pseudocode?
A high-level language that has specific syntax
A way of describing a set of instructions that doesn’t use specific syntax
A diagram that represents a set of instructions
1.What is an algorithm?
You said: A set of step-by-step instructions to resolve a problem
Correct: An algorithm is a set of step-by-step instructions to resolve a problem.
2.What are algorithms used for?
You said: To plan out the solution to a problem
Correct: Algorithms are used to plan out the solution to a problem.
3.How can an algorithm be represented?
You said: As a flowchart or pseudocode
Correct: An algorithm can be represented both as a flowchart and pseudocode.
4.What is a flowchart?
You said: A diagram that represents a set of instructions
Correct: A flowchart is a diagram that represents a set of instructions.
5. What is the correct symbol for a process instruction in a flowchart?
You said: A rectangle
Correct: A rectangle is how a process is represented in a flowchart.
6.What is the correct symbol for an input in a flowchart?
You said: A parallelogram
Correct: A parallelogram is used to show both an input and an output in a flowchart.
7.What is the correct symbol for an output in a flowchart?
You said: A parallelogram
Correct: A parallelogram is used to show both an input and an output in a flowchart.
8. What links each instruction in a flowchart?
You said: An arrow
Correct: Each instruction is linked together with an arrow, to show the direction of flow.
9.What is the correct symbol for a decision in a flowchart?
You said: A diamond
Correct: A diamond is used to show a decision in a flowchart.
10.What is pseudocode?
You said: A way of describing a set of instructions that doesn’t use specific syntax
Muhammad Sikandar Dar, Assistant Professor, IMCB, G-11/1, Islamabad
Correct: Pseudocode is a way of describing a set of instructions that doesn’t use specific
syntax.
Short Questions
Long Questions
Short Questions
Long Questions
1. Discuss the key principles of computational thinking and elaborate on their roles in
problem-solving with examples.
2. Explain the step-by-step approach a student should follow when solving a
computational problem. Provide examples to illustrate each step.
3. Detail the process involved in evaluating the order of activities in problem-solving.
How does this assessment impact the outcome?
4. Discuss the interplay between abstraction and problem-solving, providing real-
world examples of abstraction simplifying complex problems.
5. Explain the role of critical thinking in the context of computational thinking
principles. How does it aid in algorithm development and problem-solving
strategies?