0% found this document useful (0 votes)
26 views7 pages

9th Computer Exercise Ch2

The document contains a series of multiple-choice and short answer questions related to computational thinking and algorithms, focusing on problem-solving techniques and the use of IPO charts. It discusses the differences between simple and complex problem-solving, properties of computational thinking, and methods for designing solutions. Additionally, it includes examples of decision, counting, and search problems, along with practical applications in various subjects.

Uploaded by

zain Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views7 pages

9th Computer Exercise Ch2

The document contains a series of multiple-choice and short answer questions related to computational thinking and algorithms, focusing on problem-solving techniques and the use of IPO charts. It discusses the differences between simple and complex problem-solving, properties of computational thinking, and methods for designing solutions. Additionally, it includes examples of decision, counting, and search problems, along with practical applications in various subjects.

Uploaded by

zain Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Page 1

Exercise c) Sort
d) None of above
Select the suitable answer for the following
7. In IPO Charts, we have:
Multiple-choice questions.
a) Input, Plan, Output
1. For a problem, we face in real world b) Input, Program, Output
situations. In what sequence we follow c) Input, Process, Output
the steps. d) Input, Proceed, Output
I. Make some solution.
II. Understand the real-world
problem.
III. Instruct the computer to behave
accordingly.
a) I, II, III
b) I,III,II
c) II,I,II
d) II,III,I
2. Following are types of computing
problems.
I. Counting Problems
II. Search problems
III. Decision problem
a) I and II
b) I and III
c) II and III
d) I and II and III
3. Computational thinking is :
a) Programming
b) Thinking like a computer
c) Coding
d) Logically solving problems
4. To solve search problems, we need to :
a) Provide the moves.
b) Provide start state
c) Provide the end state
d) a ,b and c
5. The eight queens puzzle is the problem
of :
a) Sorting
b) Searching
c) Counting
d) Both a and b
6. Finding the location of the element with
a given value is :
a) Search
b) Traversal

Unit 2 Prepared by Mughis Raza Computational Thinking & Algorithms


Page 2

abstraction, and
algorithms
Give Short answers to the following short
Focuses on creating Focuses on human
response questions (SRQs).
solutions that can be reasoning and
1. What is the major difference in solving executed by computers understanding
simple problems and complex
problems?
4. Write four properties of Computational
Solving Simple Solving Complex thinking.
Problems Problems
Properties of Computational Thinking:
Unclear or evolving
Clear understanding of understanding of the i. Decomposition: Breaking down complex
the problem. problem problems into smaller, manageable parts.
Many interconnected ii. Pattern Recognition: Identifying
Few variables involved variables similarities or patterns to solve problems
Solutions are Solutions are uncertain efficiently.
straightforward and and may require iterative
predictable approaches iii. Abstraction: Focusing on important
information while ignoring irrelevant
details.
2. Why software designers prefer to use
IPO charts? iv. Algorithm Design: Creating step-by-step
instructions to solve problems.
Ans: 1. To visually represent the IPO model.
2. It is tabular form which is easy to understand. 5. What are the methods used to design a
3.It is considered as a handy tool that software solution?
designers use to solve problems. There are two methods that area used to design a
Example: solution:

I P O i. Flowcharts: Diagrammatic
representation of an algorithm.
Input Process Output
It describes what operations are
Data entered Operations Data that ha
required to solve a given problem.
in the system that will be been turned
applied on the into the Start
input information
Input

Processing
3. Differentiate between Computational
output
thinking and Logical thinking.
End
Computational
Thinking Logical Thinking
ii. Concept Maps: It is graphical tool
Solving problems using
that represents concepts and
computer science Solving problems using
relationship between them.
concepts reasoning and logic
Involves decomposition, Involves deduction,
pattern recognition, induction, and reasoning
Unit 2 Prepared by Mughis Raza Computational Thinking & Algorithms
Page 3

Concept 1 ▪ Problem: Solving quadratic


Includes Includes
equations.

Determines Concept 2 Includes ▪ Example: Solve the equation


(x2 - 5x + 6 = 0).
Determines Determines 8. Why do we need to think
computationally?
6. Which Computational thinking
i. Problem Solving:
technique breaks down the problem into a. Explanation: Computational
smaller parts? thinking helps us break down big
problems into smaller, manageable
Ans: The computational thinking technique that
parts.
breaks down a problem into smaller parts is b. Example: If you need to organize a
called Decomposition. school event, you can divide tasks
like booking the venue, sending
Example: If you need to write a book report, you
invitations, and arranging food.
can decompose the task into smaller steps like: ii. Efficiency:
a. Explanation: It allows us to find
1. Read the book.
the most efficient way to complete
2. Write a summary of each chapter. tasks.
b. Example: Using a computer
3. Identify the main themes. program to sort a list of names
quickly instead of doing it by hand.
4. Write the introduction and conclusion. iii. Innovation:
7. Identify 3 computing problems from a. Explanation: It encourages
creative solutions and new ideas.
other subjects that you are studying in
b. Example: Designing a new app to
your class. help students with their homework.
iv. Automation:
a. Explanation: It helps us create
1. Ans: Physics: automated solutions that save time
▪ Problem: Calculating the speed of and effort.
b. Example: Setting up a system to
an object.
automatically send reminders for
▪ Example: If a car travels 100 homework deadlines.
kilometers in 2 hours, what is its
9. The telephone numbers usually have 9
speed?
digits. Out of these 9, the first two digits
2. Chemistry: represents the area code and are it
remained constant within a given area.
▪ Problem: Balancing chemical
The last 7 digits represents the number,
equations.
and it cannot begin with 0. How many
▪ Example: Balance the equation for different telephone numbers are
the reaction between hydrogen and possible with a given area code.
oxygen to form water:
(2H2 + O2 2H2O).
1. Understanding the Problem:
3. Mathematics:
o Total Digits: 9 digits in a telephone
number.
Unit 2 Prepared by Mughis Raza Computational Thinking & Algorithms
Page 4

o Area Code: The first 2 digits are many possible routes are there that
fixed and represent the area code. someone can follow to reach from city A
to city C passing by city B?
o Number Part: The last 7 digits
represent the actual phone number Problem Explanation
and cannot start with 0.
• 4 different roads from City A to City B.
2. Calculating the Possibilities:
• 2 different roads from City B to City C.
o First Digit of the Number Part:
Drawing the Map
Since it cannot be 0, it can be any
digit from 1 to 9. So, there are 9 City A (4 roads) City B (2 roads) City C
possible choices.
Calculating the Number of Possible Routes
o Remaining 6 Digits: Each of these
Multiplying the number of choices for each part of
can be any digit from 0 to 9. So,
the journey:
there are 10 possible choices for
each digit. 1. From City A to City B: There are 4
different roads.
3. Total Combinations:
2. From City B to City C: There are 2
o First Digit: 9 choices (1-9)
different roads.
o Each of the Remaining 6 Digits:
(roads from A to B) (roads from B to C)=total routes
10 choices (0-9) 4 x 2 = 8 routes

To find the total number of different telephone Conclusion


numbers, we multiply the number of choices for
each digit: There are 8 possible routes someone can take to
travel from City A to City C, passing through City
9×10×10×10×10×10×10=9×106=9,000,000 B.
Conclusion

With a given area code, there are 9,000,000


different possible telephone numbers.

Example:

• Area Code: 12 (fixed)

• Possible Numbers:
120000001 (First)
120000002
.............
............
.............
129999999 (Last)

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
Unit 2 Prepared by Mughis Raza Computational Thinking & Algorithms
Page 5

arrange the letters is (8!) (8 factorial), which is


40,320.

e. N-queens problem: where the goal is to place


eight queens on a chessboard such that no
Give Long answers to the following extended queen attacks any other.
response questions (ERQs).
Type: Search Problem

Reason: This problem asks you to find a


Q1. Identify whether the given problems are solution that meets certain conditions. You need to
Decision Problem, Counting Problem or Search search for a way to place the queens on the board
Problem. Write your answer in front of each so that none of them can attack each other.
problem given below:
Q2. A student has to take one course of physics,
a. Does a given binary string have an even one of science and one of mathematics. He may
number of zeros? choose one of 3 physics courses (P1, P2, P3),
one of 2 science courses (S1, S2) and one of 2
Type: Decision Problem
mathematics courses (M1, M2). In how many
Reason: This problem asks for a yes or ways can this student select the 3 courses he
no answer. You need to decide if the number of has to take?
zeros in the binary string is even.
Problem:
b. Flipping a coin result in Heads or Tails. I flip
A student has to take one course each from
a coin 20 times, how many different sequences
physics, science, and mathematics. The choices
of heads and tails are possible?
are:
Type: Counting Problem
• Physics: P1, P2, P3 (3 options)
Reason: This problem asks for the number of
• Science: S1, S2 (2 options)
possible sequences. You need to count how many
different ways you can get heads and tails in 20 • Mathematics: M1, M2 (2 options)
flips. The answer is 220 or 1,048,576.
Solution:
c. Does a certain Java program say “yes” to an
To find the total number of ways the student can
empty input?
select the 3 courses, we multiply the number of
Type: Decision Problem options for each subject.

Reason: This problem also asks for a yes or i. Physics: 3 options (P1, P2, P3)
no answer. You need to decide if the Java program ii. Science: 2 options (S1, S2)
will output “yes” when given no input. iii. Mathematics: 2 options (M1, M2)

d. How many ways can the letters of the word Calculation:


TRIANGLE be arranged?
The total number of ways to select the courses is:
Type: Counting Problem 3 x 2 x 2 = 12

Reason: This problem asks for the number of Answer:


different arrangements of the letters in the word
“TRIANGLE”. The total number of ways to

Unit 2 Prepared by Mughis Raza Computational Thinking & Algorithms


Page 6

There are 12 different ways for the student to Operation (add, 2. Accept the
select one course each from physics, science, and subtract, operation to be
mathematics. multiply, divide) performed
(addition,
Reason: We multiply the number of choices for
subtraction,
each subject because each choice is independent
multiplication, or
of the others.
division).
3. Perform the
chosen operation:
Q3. Create an IPO chart which will accept the
i. If addition: result
ages of four boys and calculate their total age
= num1 + num2
and average age. The program must display
both the total age and the average age.
ii. If subtraction:
Ans: result = num1 -
num2
IPO Chart:

I P O iii. If
Input Processing Output multiplication:
Ages of four 1. Accept the 1. Total age of result = num1 *
boys (age1, ages of four the four boys. num2
age2, age3, boys. 2. Average age
age4) 2. Calculate the of the four Q5. The child wants to plan a birthday party
total age: total boys. for their friend.
age = age1 +
age2 + age3 + a) Draw an IPO chart of this situation.
age4 I P O
3. Calculate the
Input Processing Output
average age:
Friend’s Gather information A detailed
average age =
preferences about the friend’s plan for the
total age /4
(theme, preferences. birthday
food, party
Q4. Create an IPO chart of a scenario that activities) Set a budget for the
allows a user to enter in two numbers. The party.
operation to be performed is either addition, Budget for
subtraction, multiplication or division and the party Create a guest list.
accordingly the output should be given to the
user. Guest list Choose a date and
time for the party.
I P O
Date and
Input Processing Output time of the Select a venue based
Two numbers 1. Accept two Result of party on the budget and
(num1, num2) numbers from the the chosen preferences.
user. operation Venue
options

Unit 2 Prepared by Mughis Raza Computational Thinking & Algorithms


Page 7

Plan the decorations,


Supplies food, and games.
needed
(decorations, Send out invitations.
food,
games) Organize and set up
the party.

b) Write down properties on computation


thinking.

Decomposition: Breaking down the complex


problem of planning a birthday party into
smaller, manageable tasks (e.g., setting a
budget, creating a guest list, choosing a
venue).
Pattern Recognition: Identifying patterns in
previous birthday parties or events to
understand what works well and what doesn’t
(e.g., popular themes, successful games).
Abstraction: Focusing on the important
details and ignoring irrelevant information
(e.g., focusing on the friend’s preferences
rather than every possible party theme).
Algorithm Design: Creating a step-by-step
plan or set of rules to follow in order to
organize the party (e.g., a checklist of tasks to
complete).

Unit 2 Prepared by Mughis Raza Computational Thinking & Algorithms

You might also like