0% found this document useful (0 votes)
52 views5 pages

7 Unit 3 2024

7 class unit 3 notes

Uploaded by

lahorenastaliq
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)
52 views5 pages

7 Unit 3 2024

7 class unit 3 notes

Uploaded by

lahorenastaliq
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/ 5

BRIEFLY ANSWER THE FOLLOWING QUESTIONS.

1. Define computational thinking in your words.


Answer:
Computational thinking:
It involves a set of problem-solving techniques. Using these techniques, we can
understand a complex problem and provide solution that is easily
understandable by a computer, human or both.

2. Enlist techniques of computational thinking.


Answer:
Techniques Of Computational Thinking:
1. Decomposition
2. Pattern Recognition
3. Generalization and Abstraction
4. Algorithm Design

3. What do you mean by decomposition?


Answer:
Decomposition:
Using this technique, we break down a complex problem into smaller, more
manageable parts. This helps us to solve the problem easily.

4. Elaborate generalization and abstraction.


Answer:
Abstraction:
In abstraction, we learn to identify the details that are relevant to solving the
problem. We ignore the details that are not relevant.
Generalization:
Generalization allows us to create generic idea of what the problem is and how
to solve it.

5. Define algorithm in your words.


Answer:
Algorithm:
Am algorithm is a sequence of steps that can be followed by humans and
computers to complete a specific task. It is a systemic procedure that provides a
solution to the problem in a finite number of steps.

6. Enlist the characteristics of an algorithm.


Answer:
List of characteristics of an algorithm:
▪ Clear and unambiguous
▪ Well-defined inputs
1
Page

▪ Well-defined outputs
▪ Finite-ness
▪ Feasible
▪ Language independence

7. Differentiate between recursive and brute force algorithm.


Answer:
Recursive algorithm:
In this algorithm, a problem is broken into several sub-parts and called the
same procedure again and again.

Brute Force Algorithm


It goes through all possible solutions until required solution is found.

8. Differentiate between searching and sorting algorithm.


Answer:
Difference between searching and sorting algorithm:
Searching algorithm:
Searching algorithms are used for searching elements or groups of elements
from a particular data.

Sorting algorithm:
This algorithm helps us in arranging a group of data in a particular manner.

9. What are loops? Discuss its types.


Answer:
Loop:
A loop is a sequence of instructions that is executed again ang again until a
certain condition is true. If the condition becomes false, the statement outside
the branches of the loop is executed.
Types of loops:
a. Finite loop: A finite loop stops when the condition is false.
b. Infinite loop: It runs for an infinite number time because its condition
remains true for iterations.

10. Enlist advantages and disadvantages of flowchart.


Answer:
Advantages of flowchart:
1. Easy to make.
2. Easy to understand.
3. Mistakes can easily be identified.
4. Debugging becomes possible.
5. Logics can be understood easily.

Disadvantages of flowchart:
1. Difficult to present complex problems.
2. Modification is difficult.
3. Time consuming.
2

4. Difficult to understand for people who don’t know flowchart symbols.


Page
ANSWER THE FOLLOWING QUESTIONS IN DETAIL.
1. Define pattern recognition in your own words.
Answer:
pattern recognition:
Pattern recognition means to look for the patterns in the problem and
determining if there could be any of the problems or solutions we have faced in
the past can be applied here. It may also involve recognizing shapes, sounds or
images.

2. Write an algorithm to find sum of three numbers.


Answer:
Algorithm to find sum of three numbers:

1: START.
2: Declare three variables suppose a, b, c.
3: Read the three numbers to be added as input in variables a, b, c.
4: Declared a variable sum to store the sum of three numbers.
5: Add the three numbers and store the result in variable sum as sum=a+b+c.
6: Print the value of the variable sum.
7: END.

3. Write the algorithm to find whether the given umber is even or odd.
Answer:
Algorithm to find whether the given umber is even or odd:

1: START.
2: Declare a variable n1.
3: Read the number to be checked as input in variable n1.
4: Declare a variable remainder to store the resultant remainder by 2 of the
number.
5: Remainder = n1%2.
6: Check IF remainder = 0, then print “Even Number” otherwise print “Odd
Number”.
7: END.

4. Write down rules of writing a flowchart.


Answer:
Rules of writing a flowchart:
1. Use conventional flowchart symbols.
2. Every flowchart must have the start and end points.
3. Each symbol should have one exit point except the decision symbol.
4. Flow lines should not cross each other.
5. The flow lines coming out of the decision symbol should be labeled properly.
3
Page
5. Why don’t we consider memory in measuring efficiency of an algorithm.
Answer:
Memory and efficiency of an algorithm:
The efficiency of an algorithm is always measured in terms of number of steps
taken by the solution. The solution which solves the problem in less number of
steps is considered more efficient because memory is not an issue for computer
system now.

6. Draw a flowchart to find sum of three numbers.


Answer:
flowchart to find sum of three numbers

7. Draw a flowchart to find whether a given umber is even or odd.


Answer:
flowchart to find whether a given umber is even or odd:

Start

INPUT number A

Rem=A%2

No Yes
Rem=0

PRINT odd PRINT even


4
Page

Stop
8. How can we measure the efficiency of a solution.
Answer:
Measuring the efficiency of a solution:

The efficiency of an algorithm defines:


1. The number of computational resources used by an algorithm.
and
2. Time taken by an algorithm to produce the desired result.
So,
An algorithm (solution) that takes fewer resources and computes results in minimum
time is considered more efficient.

5
Page

You might also like