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

Chapter 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
45 views7 pages

Chapter 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

4.

Algorithms and Flowcharts


Q-1 Fill in the blanks.
1. A set of instruction is known as an algorithm.
2. Arrows are used as flow lines.
3. Looping means to repeat a set of instructions until a specific condition is
fulfilled.
4. Symbols are used in flowchart.
5. Each step in algorithm should be clear and unambiguous.
6. Algorithm is a basic element of programming.
7. An algorithm has zero or more but only finite numbers of input.
8. An algorithm has one or more output.
9. An algorithm lacks visual representation of program.
10.In flowchart rectangle symbol represents a process.
11.In flowchart diamond symbols indicates a decision.
12.A Flowchart is a pictorial representation of an algorithm.
13. Algorithm is a set of rules.
14. A Flowchart uses symbols.

Q-2 True or False.


1. Good programs can be easily made if the algorithm or a flowchart is
good and accurate. True
2. A counter is used to count the number of times a process being
repeated. True
3. An algorithm enables us to think logically. True
4. Only one flow line should come out from a process box. True
5. Algorithm is not time consuming and cumbersome. False
6. Algorithm is time consuming and cumbersome. True
7. An oval represents a start or end points in algorithm. True
8. The flowchart act as a guide or blueprint of program. True
9. An algorithm shouldn’t have computer code. True
10.A flowchart uses logic to solve the problem. False
11. A flowchart is prepared before algorithm. False
12.A flowchart is a pictorial representation to solve a program. True
Q-3 Choose the correct answer.
1. The following symbol shown in a flowchart represents ______.
a) input b) output c) decision d) termination
2. The following symbol in a flowchart represents _______.
a) in-connector b) out –connector c) output d) End
3. The links with another part of the program or connectors in flowchart
are shown in _____. a) Rhombus b)Parallelogram c)Circle
d) Trapezoid
4. The part of algorithm which is repeated for the fixed number of times is
classified as ______. a) Iteration b)Selection c)
sequence d) Revers action
5. What is a list of instructions in a proper order to solve a problem called?
a) Algorithm b) flowchart c) sequence d) none of
these
6. The process of walking through a program’s logic on paper before you
actually write the program is called _____.
a) Checking b) Flowcharting c) Coding d) Testing
Q-4 Answer in one word.
1. With whose name algorithm name has been derived?
A:- Al-Khwarizmi
2. Which box is used to indicate the beginning and the end of a flowchart?

A:- Start/Stop box


3. Which box is used while accepting an input or displaying an output?
A:- Input/ Output box
4. Which symbol connects a one part of the flowchart to another?

A:- Connector
5. Who was the developer of flowchart?
A:- Herman Goldstein and John Von Neumann
6. Which symbol indicates a decision?
A:- Diamond
7. How much flow line should come out from a process symbol?
A:- one
8. Which is independent of programming language?
A:- Algorithm
Q-5 Define.
1. Algorithm:- A systematic list of instructions to perform a task is known as
algorithm.
2. Flowcharts:-Flowchart is the pictorial depiction in which symbols are
used to show various operations and decision to be followed in solving
problem.
3. Looping:- Looping means to repeat a set of instructions until a specific
condition is fulfilled.
Q-6 Answer the following.
1. What is an algorithm?
Ans:- An algorithm is a set of rules and sequential steps that define how a
particular problem can be solved in finite and ordered sequence. An
algorithm is a basic element of programming in any of the computer
languages.
2. What are the advantages of algorithm?
Ans:-it has a definite procedure.
➢ It is independent of programming language.
➢ It is easy to debug as every step is got its own logical sequence.
3. What is a flow chart?
Ans:-a flowchart is a pictorial representation in which symbols are used to
show the various operations and decisions to be followed in solving
problem. A flowchart is concise in nature.
4. What are the benefits of preparing a flowchart of the problem?
Ans:-flowcharts helps in debugging process.
➢ With flowcharts, problem can be analyses in more effective way.
➢ Program flowcharts serve as a good program documentation.
5. Give difference between algorithm and flowchart.
Ans:- Algorithm Flowchart
1. Step by step formation 1. Box by box formation
2. Specific programming language used. 2. Used of logical and signs is the main
tool.
3. Mostly run to complete or manage 3. Can be used in general terms to solve
program implementations. any problem related to and individual or
group.

6. Give some characteristics of an algorithm.


Ans :- 1) Finiteness:- an algorithm consists a finite number of steps and
further.
2) Definiteness: - each step of an algorithm must be precisely
defined; every action must be definite.
3) Input: - an algorithm has zero or more but only finite number of
inputs.
4) Output: - an algorithm has one or more outputs.
5) Effectiveness:- an algorithm should be effective.
7. Give three uses of algorithm.
Ans :- 1) an algorithm is an effective method for solving a given problem.
2) It is a sequence of instructions that tells how the problem can
be addressed and solved.
3) An algorithm provides the steps for the program. With logical
instruction, we can find the solution.
8. What are the qualities of good algorithm?
Ans :- 1) input and output should be deigned precisely.
2) Each step in algorithm should be clear and unambiguous.
3) Algorithm should be most effective among many different ways
to solve a problem.
4) An algorithm shouldn’t have computer code.
9. What are the disadvantages of algorithm?
Ans :- 1) it is time consuming and cumbersome. An algorithm is
developed first which is converted into flowchart and then into a
computer program.
2) An algorithm lacks visual representation of program. It is
difficult to understand the logic used in the algorithm.
10.Explain symbols used in flowchart?
Ans :-
SYMBOLS NAME FUCTION

Start/End An oval represents a start or an end


point.

Arrows A line is a connector that shows


relationships between the
representative shapes.

Input/output A parallelogram represents input or


output.

Process A rectangle represents a process.

Decision A diamond indicates a decision.


Small circle or When describing a portion of a
connector symbol complete algorithm continued from or
will continue on.

11.What are the features of flowcharts?


Ans:- The features of flowcharts are as follows:-
1. Communication:- Flowcharts are better way of communicating the logic
of a system to all concerned.
2. Effective analysis:- With the help of flowchart, problem can be analyzed
in more effective way.
3. Proper documentation:- Program flowcharts serve as a good program
documentation, which is needed for various purposes.
4. Efficient coding:- The flowcharts act as guide or blueprint during the
systems analysis and program development phase.
5. Proper Debugging: - The flowchart helps in debugging process.
6. Efficient program maintenance:- The maintenance of operating program
becomes easy with the help of operating program becomes easy with the
help of flowchart. It helps the programmer to put efforts more efficiently on
the part.

12.What are the limitations of using flowchart?


Ans:- the limitations of using flowcharts are,
1. Complex logic:- Sometimes, the program logic is quite complicated. In
that case flowcharts become complex and clumsy.
2. Alterations and modifications:- If alterations are required, the flowchart
may require redrawing completely.
3.Reproduction:- As flowchart symbols cannot be typed, reproduction of
flowchart become a problem.

Q-7 Draw Flowchart:-

1.Find the area of circle of radius r.

START
READ r

AREA =3.14 * r*r

PRINT AREA

END
2. Convert temperature Fahrenheit to Celsius
START

READ F

C=5/9*(F-32)

PRINT C

END

3.Flowchart for an algorithm which gets number and prints sum of their value.

START

READ A and
B

C=A+B

PRINT C

END

4. Flowchart for the problem of printing even numbers.


START

I=10

WRITE I

I=I+2

YES
I<=100

NO

END

5 .Flowchart for the greater number between two numbers.

START

READ A and
B

TRUE Is A>B
FALSE

PRINT A PRINT B

END

You might also like