Following is the 9th class computer notes unit 2 according to the Federal Board of Intermediate and Secondary Education (FBISE)
The major difference between solving simple problems and complex problems lies in the level of difficulty and the number of steps required to reach a solution. For simple problems, the four steps are used to solve the problem. However, for complex problems, the six-step problem-solving process could be used.
IPO charts are to visually represent the IPO model. Software designers prefer to use IPO (Input-Process-Output) charts because they help visualize how data flows through a system. IPO charts are considered a handy tool that software designers use to solve problems.
Using computation to solve problems requires the ability to think in a certain way, which is often referred to as ‘computational thinking’.
Logical thinking refers to analyzing a particular situation or problem using reason and accordingly reaching up to one or more decisions that are sensible.
Following are the four properties of Computational thinking.
Decomposition: Breaking down the larger problems into smaller/ manageable ones and working on them one by one
Abstraction: by removing the unnecessary details to the solution, so you could be able to identify essential information.
Pattern Recognition: Examine the problem for a pattern or similarities between previously solved problems.
Algorithm Design: This is the actual design of the solution. This involves creating a step-by-step plan for the problem solution.
There are two methods that are used to design a solution:
Flowcharts: A flowchart is a diagrammatic representation of an algorithm. It describes what operations are required to solve a given problem.
Concept Maps: A concept map is a graphical tool that represents concepts and relationships between them. The concepts in these maps are represented as boxes or circles, which relate to lines or arrows.
Decomposition: Breaking down the larger problems into smaller/ manageable ones and working on them one by one. These smaller problems are referred to as subproblems.
Mathematics: Optimization problems, such as finding the minimum or maximum value of a function.
Biology: Computational biology involves analyzing biological data using computing methods.
Physics: Simulating complex physical systems is a common computing problem in physics.
We need to think computationally because it encourages us not only to reflect clearly on a problem we’re solving but also to define a repeatable solution for it. Computational thinking can be thought of as an extension of logical thinking.
To calculate the number of different telephone numbers possible with a given area code, we need to consider the restrictions on each digit:
i. The first digit (area code) has no restrictions, so it can be any digit from 0 to 9.
ii. The second digit (area code) also has no restrictions, so it can also be any digit from 0 to 9.
iii. The third digit (the first digit of the number part) cannot be 0, so there are 9 options (1 to 9).
iv. The remaining six digits (the number part) can each be any digit from 0 to 9, so there are 106 possible combinations.
Therefore, the total number of possible telephone numbers with a given area code is: 10×10×9×106 = =900,000,000
Number of possible routes=4×2=8
So, there are 8 possible routes from City A to City C passing by City B.
a. Does a given binary string have an even number of zeros? Decision Problem
This problem involves determining whether a property holds true for a given input (binary string). In this case, it’s determining if the number of zeros in the string is even.
b. Flipping a coin results in Head or tails. I flip a coin 20 times, how many different sequences of heads and tails are possible? Counting Problem
This problem involves counting the number of possible outcomes (sequences of heads and tails) for a given scenario (flipping a coin 20 times).
c. Does a certain Java program say “yes” to an empty input? Decision Problem
This problem involves determining whether a certain property holds true for a given input (empty input in this case), i.e., whether the program outputs “yes” for an empty input.
d. How many ways can the letters of the word TRIANGLE be arranged? Counting Problem
This problem involves counting the number of arrangements (permutations) of the letters in the word TRIANGLE.
e. N-queens problem: where the goal is to place eight queens on a chessboard such that no queen attacks any other. Search Problem:
This problem involves searching for a solution that satisfies certain constraints. It’s an example of a search problem where the solution space needs to be explored to find a valid arrangement.
To find the total number of ways the student can select the 3 courses, we multiply the number of options for each subject:
So, the total number of ways to select the courses is:
3×2×2=12
Therefore, the student can select the 3 courses in 12 different ways.
The following are the properties of computation thinking:
Decomposition: Breaking down the larger task of planning a birthday party into smaller, more manageable parts and working on them one by one such as selecting a theme, choosing a location, planning activities, arranging food, and managing invitations. These smaller problems are referred as sub-problems. This way we simplify the problem and solve it easily.
Abstraction: Focusing on the essential aspects of the birthday party planning process while ignoring irrelevant details, such as specific decoration designs or individual guest preferences.
Pattern Recognition: Identifying common elements or patterns in birthday party planning, such as typical activities, popular themes, or preferred foods, to make informed decisions.
Algorithm Design: This involves creating step-by-step procedures or plans to organize the birthday party efficiently, ensuring that all necessary tasks are completed in the right order to achieve the desired outcome.
1. For a problem, we face in real-world situations. In what sequence do we follow the steps?
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, III
d) II, III, I
2. The following are types of computing problems
I. Counting Problems
II. Search Problems
III. Decision Problem
a) l and II
b) l and III
c) ll and III
d) l 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
c) Sort
d) None of the above
7. In IPO Charts, we have
a) Input, Plan, Output
b) Input, Program, Output
c) Input, Process, Output
d) Input, Proceed, Output
Unit 8: Entrepreneurship in Digital Age Write answers of the following short response questions. Q.1.…
Unit 7: Digital Literacy Write answers of the following short response questions. Q.1. Differentiate between…
Unit 6: Impacts of Computing Write answers to the following short response questions. Q1. List…
Unit 5: Applications of Computer Science Write answers of the following short response questions. Q1.…
10th Computer Science Unit 4 Data and Analysis Write answers of the following short response…
10th Computer Unit 3: Programming Fundamentals Unit 3: Programming Fundamentals Write answers of the following…