Computer (Unit2 Notes)
Computer (Unit2 Notes)
Ans: A problem is a challenge or situation that needs to be our come using some action. The problems
are present in all field such as economic, healthcare, education, transportation, internet, biology and
many more.
Q.No.13: Write down the step we should follow while solving simple problem.
Ans: Computational thinking is important when solving problems because it helps you:
Ans: Logical thinking: The systematic evaluation of information and ideas to form a judgment or
Ans: The role of logical thinking in problem solving it to analyse situations, identify patterns, evaluate
options, and make sound decisions to reach effective solutions.
The role of Algorithm Thinking in problem solving is to provide a clear, step-by-step approach to solve
complex problems efficiently, ensuring consistency, accuracy, and scalability.
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?
d. How many ways can the letters of the word TRIANGLE be arranged?
e. N-queens problem: where the goal is to place eight queens on a chessboard such that no queen
attacks any other.
• Type: Search Problem
• Explanation: The N-queens problem involves finding a solution to place queens on a chessboard such
that no two queens can attack each other. It is a search problem because it requires finding one or more
solutions that satisfy the given constraints.
Q.No.2. A student has to take 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
courses (M1, M2). In how many ways can this student select the 3 courses he has to take?
To determine how many ways a student can select one course each from physics, science, and mathematics:
To find the total number of combinations, you multiply the number of choices for each category:
Total ways= Number of Physics Courses × Number of Science Courses × Number of Mathematics Courses
text
Total ways=3×2×2=12
Q.No.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 age and the average age.
IPO Chart:
IPO Chart:
a) IPO Chart:
1. Decomposition: Breaking down a complex problem (planning a party) into smaller, manageable tasks
(guest list, venue, invitations, etc.).
2. Pattern Recognition: Identifying common elements in the party planning process (e.g., needing to send
invitations, arrange supplies).
3. Abstraction: Focusing on the essential details needed for planning (e.g., main tasks rather than every
detail).
4. Algorithm Design: Creating step-by-step procedures for each part of the planning process to ensure
everything is covered efficiently.
5. Evaluation: Assessing the effectiveness of the planning process and making adjustments as needed (e.g.,
ensuring invitations were received).