Chapter 1 Grade 8
Chapter 1 Grade 8
1. What is a Flowchart?
2. Flowchart Symbols
1. Oval (Terminator)
• Purpose: Indicates the start and end points of the flowchart.
• Example:
Here’s a simplified version of the flowchart symbols:
• Start 1. Oval (Terminator)
• End • Purpose: Marks the start or end of the flowchart.
•
2. Parallelogram Example:
(Input/Output)
• Start
• Purpose: Shows
• Endinput to and output from the process.
• Example:2. Parallelogram (Input/Output)
• Input: “Enter
• number”
Purpose: Represents input or output of data.
• Example:
• Output: “Display
• result”
Input: “Enter number”
3. Rectangle • (Process/Instruction)
Output: “Display result”
3. Rectangle (Process)
• Purpose: Represents
•
a process or operation that is to be performed.
Purpose: Shows a task or action.
• Example:• Example:
• “Add two• numbers”“Add two numbers”
• “Calculate area”
• “Calculate4. area”Diamond (Decision)
4. Diamond• (Decision)
Purpose: Indicates a decision with two options, like Yes/No.
• Example:
• Purpose: Used
•
for decision-making steps that involve a Yes/No or
“Is number > 10?”
True/False choice.• “Is age ≥ 18?”
• Example: 5. Arrow (Flow Lines)
• Purpose: Shows the direction of the process flow.
• “Is number > 10?”
• “Is age >= 18?”
5. Arrow (Flow Lines)
• Purpose: Shows the flow or direction of the process.
6. Rules of pseudocode
The identifiers in these three examples are colour, name and animal.
Operator symbol
comma ,
Plus sign +
Ampersand &
Operator Symbol
Addition +
Subtraction -
Multiplication *
division /
* IF THEN
* IF THEN ELSE
* ELSEIF
11. Boolean operators
AND One condition on either side If both conditions are true, the result
is true.
Otherwise, the result is false
OR One condition on either side If one, or both, condition are true, the
result is true.
It is false only when both conditions
are false
NOT One condition If the condition is true, it makes it
false.
If the condition is false, it makes it
true.
Ans : The first is not valid because the text to be output is not in double
quotation marks – it is an English statement and is not like code.
Question 1.2 (Page no : 25)
Q3)What are the two signs that can be used for assignment pseudocode ?
Ans :Equals (=) and back arrow (←) .
Q4) What are the names of the variable in this pseudo code program
first 1
second 2
third first +second
Ans :first, second, third .
Q5) What is the value stored in answer after each pseudocode statement is run?
Ans : a answer 1* 10= 10
. b. answer (20 / 2 )+5 = 15
c.answer 50 * 2 - 1 = 99
d. answer 1 + 2 - 3 = 0.
Ans : IF.
Q3)What will this algorithm output ?
Ans :"Smaller"
Ans :
a. "second"
b. "same"
c. When both values are the same
d. When the first number is the larger
e. When the second number is the larger.