Professional Documents
Culture Documents
9th CS Unit-1
9th CS Unit-1
9th CS Unit-1
Unit# 1 – Exercise
Q1. In a farm, there are some cows and birds. If there are total 35 heads
and 110 legs then how many cows and birds are there?
Total heads: C + B = 35
Expressing B in terms of C: B = 35 – C
4C + 2(35 – C) = 110
4C + 70 – 2C = 110
4C -2C + 70 = 110
2C + 70 = 110
2C = 110 – 70
2C = 40No
C = 20
3. Finding Birds:
B = 35 – 20
B = 15
4. Answer:
1
Q2. Define problem analysis. Explain your answer with an example.
Problem Analysis: Problem analysis means figuring out what's wrong and
why. It's about looking at a problem step by step to understand it better.
This includes identifying the problem, gathering information, researching
solutions, and analyzing what's causing the issue.
Example: Imagine your computer keeps crashing. First, you'd check when
it happens and what programs are open. Then, you'd look for any error
messages. After that, you'd search online to see if others have had similar
problems and how they fixed them. Finally, you'd think about why it's
happening, like if there's a problem with the software or something wrong
with the computer's parts.
Q3. Define an algorithm & argue on its rule & importance in problem
solving.
Rule & Importance: The rule of an algorithm is to give clear and precise
instructions that anyone, including a computer or a person, can follow to
solve a problem efficiently. Algorithms are important in problem-solving
because they help us break down big problems into smaller, easier steps.
This makes it easier to solve the problem accurately every time.
Q4. Solving a problem has multiple algorithms. How would you choose the
most efficient one? Explain with examples.
Choosing the Most Efficient Algorithm: When we want to pick the best
way to solve a problem, we think about things like how fast it works, how
much memory it needs, and how easy it is to understand. We can do this
by comparing different methods and seeing which one is better in terms
of time and space.