Thursday, 23 December 2021

L-6 Algorithm and Flow Chart / Class 6th computer

 

Class 6th

Subject – Computer

L-6 Algorithm and Flow Chart

          Write Algorithm for

1. Algorithm to buy a pen

Step 1 Start

Step 2 Go to a Stationery shop.

Step 3 Select a Pen.

Step 4 Pay the Price

Step 5 Take a pen.

Step 6 Go Home.

Step 7 Stop.

 

2. Write an algorithm to find the smallest number between two numbers.

Step1: Start

Step2: Input two numbers, say A and B

Step3: If A<B then small = A

Step4: If B<A then Small = B

Step5: Print Small

Step 6: End

3. Write an algorithm to add 2 numbers

Step1: Start

Step2: Take two numbers A and B.

Step3: Find Sum.

Step4: Give the Result

Step5: Stop

 

4. An algorithm to calculate even numbers between 20 and 40

Step1: Start

Step2: Store 20 in I

Step3: Display I

Step4: Add 2 to I

Step5: IF(I<=40) then go to Step 3

Step6: End



Fill in the blanks:-

1. Every program needs to display certain output after processing the

 Input  data.

2. There must be   START   and END point for every flowchart.

3. A flowchart is defined as a symbolic or a graphical representation of an algorithm

that uses different standard symbols

4. The program written without proper pre-planning has higher chances of

errors.

5. People without the knowledge of programming can read and understand the

steps in the algorithm.

State True or False:

1. An Algorithm is graphical representation of a program.                     FALSE

2. The oval shape symbol is used to represent both Start and Stop.        TRUE

3. While writing an algorithm, it is not necessary to give number to every instruction.

                                                                                 FALSE

4. The general direction of flow in any flowchart is from left to right.      FALSE

5. The diamond shaped symbol is used to take decisions.                   TRUE

Answer the following questions.

1. What is a flow chart?

Ans: A flowchart is a diagram that uses different symbols to visually present the flow of data.

 

2. What are the rules for writing the algorithm?

Ans: 1) Every instruction should be written in separate line.

2)  The step number should be mentioned before each instruction.

3)  Be very sure the instructions are written in right order.

 

3. Write the function of flow lines.

Ans: Flow lines Shows direction of flow.

 

4. Write different types of algorithm.

Ans: The algorithm and flowchart are classified into three types of control structures.

1. Sequence

2. Branching(Selection)

3. Loop(Repetition)

 

5. Write any four points which should keep in mind while drawing a flow chart.

Ans: Guidelines for drawing a flowchart.

1)    The Title for every flowchart is compulsory.

2)     There must be START and END point for every flowchart.

3)     The symbols used in flowchart should have only one entry point on the top. The exit point for symbols (except for decision/diamond symbol) is on the button.

4)     There should be two exit points for decision symbol; exit points can be on the bottom and one side or on the sides.

5)     The flow of flowchart is generally from top to bottom. But in some cases, it can also flow to upward direction

6)     The direction of the flow of control should be indicated by arrowheads.

7)     The operations for every step should be written inside the symbol.

8)     The language used in flowchart should be simple so that it can be easily understood.

9)     The flow lines that show the direction of flow of flowchart must not cross each other.

10)                While connecting different pages of the same flowchart, Connectors must be used.

 

6. State the function of these symbols used in flowchart.

Ans:



No comments:

Post a Comment

L-1 Indian Heroes in IT/ 8th computer

  Class 8 th Subject : Computer Science L-1 Indian Heroes in IT Make a list of Indian Heroes in IT with their achievement S....