CODING NOTES
CLASS-VI
Chapter-2
(ALGORITHMS WITH BLOCK CODING)
Q: What does the term Algorithm means? or What is Algorithm?
Ans: An algorithm is defined as the step-by-step plan to solve the problem for a given problem statement.
Before writing a program code for a given problem in computer science, it is essential to devise/write a set of
steps (with paper and pen) to be followed to solve the problem successfully.
Q: What is Flowchart?
Ans: A flowchart is a diagrammatic representation of the step-by-step plan to be followed for solving a task
problem statement. This diagrammatic representation is made up of shapes like boxes, diamonds,
parallelograms, circles, ellipses connected by arrows. Each shape acts as a step in the solution and the arrows
represent the direction of flow among the steps.
Flowchart has only one start and one stop point/symbol.
Symbols used in Flowchart :
SYMBOLS Purpose
TERMINAL/ Indicates start/stop/halt.
START/STOP
INPUT/OUTPUT Indicates instructions that either
take inputs or display output.
PROCESSING BOX Indicates instructions that
represent computation.
DECISION BOX Indicates decision-based
operations such as yes/no or
true/false.
CONNECTORS Complex flowcharts which spans
over more than a page are
connected via a connector.
FLOWLINES Indicates a direction of flow of
sequence in a Flowchart.
Q:What are the benefits of a Flowchart?
Ans: A flowchart helps us understand and plan a task step by step. Its benefits are:
Explains your approach – A flowchart helps you show how you plan to solve a problem step by step.
Gives visual clarity – It uses symbols and arrows to make the problem easier to understand.
Helps in practical problem-solving – It makes it easier to find the best way to solve a problem.
Acts as a guide – The flowchart stays as a record, so you can refer to it later while writing or checking
your code.
Easy to understand – It shows steps using simple symbols and arrows.
Flowcharts make problem-solving easier and clearer, helps in planning, find mistakes.
Q: What is a pseudo code?
Ans: Pseudo code is used to describe the steps followed in an algorithm via simple human-language.
Thus, it has no syntax of any programming language and can be understood by a layman.
Example:
EXERCISE
Q: Draw a flowchart :
(i) to display the message “ Good Morning”.
(ii) to enter two numbers and print them.
(iii) To enter two numbers and find the arithmetic operations(+,-,*,/)
(iv) Draw a flowchart to find the largest of two numbers.
(v) Draw a flowchart to check if a number is even or odd.
(vi)Draw a flowchart to calculate the area of a rectangle, circle.
(vii) Draw a flowchart to find if a number is positive, negative, or zero.
Q: Below is a flowchart to calculate profit and loss. Answer questions 1 to 3 based on the flowchart.
Question 1: Jyoti owns a toy shop. She bought a toy for Rs 325 and sold it for Rs. 375. Which one from the below is
correct?
Option 1 She made a loss of Rs. 50 Option 2 She made a profit of Rs. 50
Question 2 : Raju buys a pen for Rs 15, and after some time, he sells it for Rs 10. Which one from the below is
correct?
Option 1 He made a loss of Rs. 5 Option 2 He made a profit of Rs. 5
Question 3: Ram buys a table for Rs 500, he sells it for Rs 550. Which one from the below is correct?
Option 1 He made a loss of Rs. 50 Option 2 He made a profit of Rs. 50
Question 4: Which of the following is not an advantage of a flowchart?
Option 1 Efficient coding Option 2 Systematic testing
Option 3 Improper documentation Option 4 Better communication
Question 5: The following box denotes.
Option 1 Initialization Option 2 Decision
Option 3 Input / Output Option 4 Connectors
Question 6: What is a flowchart?
Option 1 A specific programming language
Option 2 A text-based way of designing an algorithm
Option 3 A bullet point list of instructions
Option 4 A diagram that represents a set of instructions
Question 7: What shape represents the start and end of a flowchart?
Option 1 Square Option 2 Diamond Option 3 Oval Option 4 Circle
Q: Below is a flowchart on how to calculate if a number is even or odd. Write the corresponding pseudo code for the
problem.
Note: Modulus operator (%) is used to find the remainder of two number.
EXERCISE
Q: Match the following:
1. Algorithm Writing steps involved to solve a problem in a human-understandable language
2. Flowchart Block based coding platform
3. Pseudo Code Define step by step plan to solve a problem statement
4. Arcade Solution to a problem presented as a diagram
Solution:
1. Algorithm Define step by step plan to solve a problem statement
2. Flowchart Solution to a problem presented as a diagram
3. Pseudo Code Writing steps involved to solve a problem in a human-understandable language
4. Arcade Block based coding platform