Search Header Logo
G7: Flowcharts

G7: Flowcharts

Assessment

Presentation

Computers

6th - 8th Grade

Practice Problem

Medium

Created by

Soleha Majeed

Used 33+ times

FREE Resource

105 Slides • 51 Questions

1

​Computational thinking and programming

By Soleha Majeed

2

1.1 FLOWCHARTS - PG 9

Understand the structure of a flowchart,
how to follow, edit, correct a flowchart.

and finally how to create a flowchart to solve a problem

3

What is a Flowchart?

  • A flowchart is a diagram that shows steps in order.

  • It can represent:

    • Actions (e.g., stand up, clap)

    • Computer programs (e.g., calculations, outputs)

  • Uses shapes and arrows to show sequence.

4

media

5

media

Flowcharts in Real Life

Flowcharts are used in:

  • Science (lab experiments)

  • Geography (processes like water cycle)

  • History (sequence of events)

  • Computer Science (program design)

6

What about scratch?

media
media

7

Multiple Choice

What is the purpose of a flowchart?

1

To show a sequence of steps in order.

2

To store files

3
To summarize a book's main themes.
4
To create a detailed report on financial data.

8

Fill in the Blank

A flowchart is a diagram that shows a ________ of steps that should be followed.

9

Flowchart Shapes - pg 11

  • Start/Stop (Oval): Beginning or end of program

  • Input/Output (Parallelogram): Enter data or display result

  • Process (Rectangle): Action or calculation

  • Arrows: Show the flow of data

10

media

11

Multiple Choice

Which shape is used for input or output in a flowchart?

1

Diamond

2

Oval

3

Parallelogram

4

Rectangle

12

media

13

media

14

media

15

Multiple Choice

Which shape is used for start or end in a flowchart?

1

Diamond

2

Oval

3

Parallelogram

4

Rectangle

16

Data flow

A data flow is an arrow. The arrows show you which box to move to next.

media

17

Multiple Choice

What tells you the direction to move in a flowchart?

1

Text

2

Arrows

18

Variables in Flowcharts

media

19

media

x

​x

1

20

media

21

Example: Using Variables

media

22

Fill in the Blank

On page 13, what do you think is the variable name in the flowchart?

23

Variables in Flowcharts - pg 13

  • A variable = a named storage location.

  • It stores data that can change.

  • Example: age variable can store numbers.

  • Flowcharts can:

    • Input data into a variable

    • Change data (age = age + 10)

    • Output data

24

Multiple Choice

What is a variable in a flowchart?

1
A variable is a fixed value in a flowchart.
2
A variable is a storage location in a flowchart that holds data values.
3
A variable is a graphical representation of a process.
4
A variable is a type of flowchart symbol.

25

media

age

12

age

Example: “Box named AGE. Today I put 12 in it, tomorrow I can put 13.”

26

media

27

Multiple Choice

If you input age = 15, what will the flowchart output?

1

15

2

30

3

10

4

25

28

Multiple Choice

If you input age = 25, what will the flowchart output?

1

15

2

30

3

35

4

25

29

Grade 7: In your notebooks, write the answers to the following questions

Solve the questions pg 12, questions 1.1

Draw a simple flowchart, that should include all shapes (rectangle, parallelogram and oval) with data flow.

30

Common Flowchart Tasks

  • Reading a Flowchart: Identify inputs, outputs, processes.

  • Correcting Errors:

    • Wrong operators (+, -, *, /)

    • Wrong variables

    • Incorrect input/output

  • Changing Flowcharts:

    • Adding new steps

    • Changing calculations

Example: A flowchart to add three numbers but missing one in total calculation.

31

Multiple Choice

If a flowchart outputs 20 instead of 10, what is the first step?

1

Delete the flowchart

2

Trace the algorithm

3

Ignore it

4

Add more arrows

32

media

​What is wrong in this flowchart?

33

<--- Missing step here, added ✅

media

34

media

​pg 17

35

media

​pg 17

Where is the mistake in this flowchart?

The answer should come as 6 when adding all 3 numbers

36

media

​pg 17

The answer should come as 6 when adding all 3 numbers

<--- Missing '+ third' here ✅

37

Questions in the notebook:

Students answer the following questions in their notebooks:

1. What is a variable in a flowchart?

2. How can you find and correct an error in a flowchart?

3. Why should you retest a flowchart after editing it?

Unplugged Activity - 1.3


Find the answers in the book.

38

​Video

39

Creating Flowcharts pg-21

  • Steps to Create:

    • Write the algorithm in short steps.

    • Identify inputs, processes, and outputs.

    • Draw flowchart with correct shapes.

    • Test your flowchart.

  • Example Task:

    • Input name and favorite food

    • Output: "I like [food]."

40

Multiple Choice

Which is the first shape in every flowchart?

1

Stop

2

Input

3

Process

4

Start

41

Multiple Choice

What should you do before drawing a flowchart?

1

Memorize all flowchart symbols

2

Start drawing without planning

3

Use mathematical formulas

4

Write the steps of the algorithm

42

​Simple flowchart "Hello [name]"

43

​Simple flowchart "Hello [name]"

media

44

Make a flowchart that asks a user for their age and outputs:
“You are [age] years old.”


Note: It is going to be made the same way

In your notebooks:

media

45

Age Flowchart

media

46

Why is there no process box?

media
media

47

Use Input/Output only (no process box) when…

  • You are just asking the user for information (input)

  • You are just showing a message or result (output)

Examples (no process needed):

  • Input Name → Output “Hello [Name]”

  • Input Favorite Color → Output “Your favorite color is [color]”

48

Use Process box when…

You perform a calculation or change data before outputting it

Examples (process needed):

  1. Input Age → Process: NextYear = Age + 1 → Output “Next year you will be [NextYear]”

  2. Input Number1, Number2 → Process: Total = Number1 + Number2 → Output Total

  3. Input Length, Width → Process: Area = Length × Width → Output Area

49

Study the flowchart on page 22-23

Take 5 minutes and discuss with the class.

50

Open Ended

What are the variables used in the flowchart given on page 22 and 23?

51

Flowchart Requirements Checklist

Checklist:
✅ Start and Stop symbols
✅ Correct use of Input/Output, Process symbols
✅ One arrow in, one arrow out for each step
✅ Consistent variable names
✅ All boxes lead to another box

52

Multiple Choice

Why should variable names be used consistently in a flowchart?

1

To make the diagram look neat

2

To avoid confusion and errors

3

To reduce the number of boxes

4

To make it shorter

53

media

Selection and Logic in Flowcharts

54

Selection and Logic in Flowcharts

Understanding IF, THEN, ELSE, comparison operators, and Boolean logic


builds on basic flowcharts and shows how decisions are made in algorithms.

55

Multiple Choice

Which symbol is used for decisions in flowcharts?

1

Oval

2

Diamond

3

Rectangle

4

Parallelogram

56

What is Selection?

  • A selection statement is used when a decision needs to be made.

  • It has a condition (true or false).

  • If the condition is true, one action happens.

  • If the condition is false, another action happens.



Example:
IF it is raining THEN take an umbrella ELSE wear sunglasses.

57

media

58

Multiple Choice

A selection statement always results in:

1

True or False

2

Multiple answers

3

Numbers only

4

Errors

59

media

60

Flowchart Selection Symbol

  • Selection uses the diamond shape.

  • Inside the diamond: write the condition.

  • Two arrows: True (Yes) and False (No).


Example Flowchart:
IF colour = blue
→ Yes: OUTPUT "Nice choice!"
→ No: OUTPUT "I prefer red."

61

​Example 1: Pass or Fail

62

media

63

Multiple Choice

How many arrows come from a selection box?

1

1

2

2

3

3

4

Unlimited

64

IF, THEN, ELSE

  • IF: The condition (true/false)

  • THEN: Action if condition is true

  • ELSE: Action if condition is false

Flowchart Example:
Start → Input colour → IF colour = purple → Yes → "Good!" → No → "Purple is better."

65

media

66

Multiple Choice

Which part of IF, THEN, ELSE describes what happens if the condition is false?

1

IF

2

THEN

3

ELSE

4

Condition

67

​IF number > 10
THEN clap
ELSE snap.

68

Comparison Operators

media

69

Multiple Choice

Which operator means "not equal to"?

1

==

2

!=

3

>=

4

<=

70

Comparison Operators

  • Operators: >, <, >=, <=, ==, !=

  • Used to compare two values.

  • Result is always True or False.

Examples:

  • 10 > 2 → True

  • 5 == 5 → True

  • 8 != 3 → True

71

Multiple Choice

10 < 8

1

True

2

False

72

Multiple Choice

11 =! 8

1

True

2

False

73

Boolean Logic

  • Boolean values: True / False

  • Boolean Operators:

    • AND → both must be true

    • OR → at least one true

    • NOT → reverses the result

74

Boolean Logic

  • real examples:

    • AND → "I will go outside IF it is sunny AND warm."

    • OR → "I will eat pizza IF it has cheese OR mushrooms."

    • NOT → "I will NOT eat broccoli."

75

AND: Both statements should be true. If one of them is wrong then the whole statement considered false.

Is 10 > 5 AND 3 > 1

76

Multiple Choice

Is 4 > 5 AND 3 > 1

1

True

2

False

77

OR: At least on from both statements should be true. If both of them is wrong then the whole statement considered false.

4 > 5 OR 3 > 1

78

NOT: The result is opposite.

Is NOT 8 < 2?

79

Multiple Choice

Is NOT 50 > 20?

1

True

2

False

80

Multiple Choice

Is NOT 60 < 25?

1

True

2

False

81

Summary

  • Selection makes decisions.

  • Symbol: diamond.

  • Three parts: IF, THEN, ELSE.

  • Comparison operators compare values.

  • Boolean logic (AND, OR, NOT) makes conditions stronger.

82

NOTEBOOK WORK: PG 39 ( questions 1.4)

All questions to be done in notebook.

For the first question,
your partner will give a 2 boolean value/condition on their own on the slip provided, you have to solve it and paste it in your copy

83

Introduction to Text-based Programming pg 55

Note: Skip 1.3 pg 40 till 54

84

Introduction to Text-based Programming

  • Programming can be done in two main ways:

    • Block-based languages (e.g., Scratch) → drag & drop blocks.

    • Text-based languages (e.g., Python) → type commands as text.

  • Python is a text-based programming language used worldwide.

85

media

​Text-based vs. Block-based coding

86

Multiple Choice

Which of the following is a text-based programming language?

1

Scratch

2

Python

87

Why Learn Text-based Languages?

  • Block-based is easier (less chance of mistakes).

  • But block-based has limitations.

  • Text-based allows more control, flexibility, and power.

  • Python is closer to real-world software development.

media

88

Multiple Choice

Which of these is a limitation of block-based languages?

1

Cannot drag and drop

2

Cannot do advanced tasks

89

Python and Syntax

  • Syntax = grammar/rules of a language.

  • Mistakes in syntax cause errors.

  • Examples of rules in Python:

    • print must be lowercase.

    • Use " " or ' ' for messages.

    • Use () after print.

90

What is the difference between the two statements?

✅ Correct: print("Hello World")
❌ Error: PRINT("Hello World")

91

Multiple Choice

What is syntax in programming?

1

Rules of the programming language

2

A mistake in the program

92

Using Editors and IDEs

  • Editor = software to write code.

  • IDE (Integrated Development Environment):

    • Includes editor + tools to run/debug programs.

  • Examples: IDLE (basic) & PyCharm (advanced).

93

Multiple Choice

Which of these is an IDE for Python?

1

Paint

2

IDLE

94

The Print Command

  • Output command = print()

  • Always lowercase

  • Needs brackets ()

  • Message inside quotation marks

95

media

96

Multiple Choice

Which statement will correctly output Hello World?

1

print Hello World

2

PRINT("Hello World")

3

print("Hello World")

97

Output Multiple Messages

Each print statement outputs on a new line.

media

98

Common Errors

Errors happen often. Examples:

  • rint("Hello") → missing ‘p’

  • print("Hello) → missing quotation

  • PRINT("Hello") → uppercase issue

99

Debugging

“Debugging = important programmer skill.

Debugging is the process of finding and fixing errors or bugs in the source code

media

100

Multiple Choice

What is the error in print("Sky is blue)?

1

Missing quotation mark

2

Wrong case

101

In your notebooks,

pg 64, questions 1.8 q1 -q6

102

Introduction to Variables

🔹 A variable is a storage location in memory that can hold data.
🔹 You can store numbers, text, or symbols inside variables.
🔹 Example:

103

Introduction to Variables

myData = 20 # myData stores 20

myColour = "Red" # myColour stores Red

104

Multiple Choice

Which of the following correctly stores text in a variable?

1

name = Ali

2

name = "Ali"

3

name = 'Ali'

4

Both B and C

105

Assignment Statements

variable = data

  • Left side → variable name

  • Right side → data (value)

  • The equals sign means "stores", not “is equal to.”


score = 100 # score stores 100

106

Multiple Choice

In the statement age = 15, what does 15 represent?

1

The variable

2

The identifier

3

The assignment operator

4

The value stored

107

Arithmetic Operators

🔹 Used for calculations in Python:

  • + (Addition)

  • - (Subtraction)

  • * (Multiplication)

  • / (Division)

Example:


score = 100 # score stores 100

108

Multiple Choice

What will be stored in result = 12 / 3?

1

4

2

4.0

3

"4"

109

BIDMAS Rule

🔹 Order of operations in Python follows BIDMAS:

  • Brackets

  • Indices

  • Division / Multiplication

  • Addition / Subtraction

Example:

value1 = 1 + 2 x 3 # 2 3 = 6 → 1 + 6 = 7
value2 = (1 + 2) x 3 # (1 + 2) = 3 → 3
3 = 9

110

Arithmetic Operators Examples

x = 5 + 3 # x stores 8

y = 10 - 2 # y stores 8

z = 4 * 2 # z stores 8

q = 16 / 2 # q stores 8.0

111

Changing Variable Values

🔹 Variables can be updated with new values.

Example:

score = 10
score = score + 1
print(score) # Output: 11

112

Multiple Choice

If score = 20, what will be stored after score = score + 5?

1

20

2

25

3

5

4

Error

113

Initialising Variables

🔹 Initialising means setting a starting value before using a variable.

Example (error without initialisation):

score = score + 1

114

Initialising Variables

Corrected version:


score = 0

score = score + 1

print(score) # Output: 1

115

Multiple Choice

Why do we initialise variables?

1

To avoid syntax errors

2

To make variables visible in output

3

To prevent memory leaks

4

To ensure they have a starting value

116

Outputting Variables

🔹 print() can display variables and text.

media
media

117

Multiple Choice

print("name") vs print(name). What is the difference?

1

print("name") outputs the variable 'name'; print(name) outputs 'name'.

2
print("name") outputs 'name'; print(name) outputs the value of the variable 'name'.

118

Multiple Choice

Question image

What will this program output?

1

I love Python

2

I love "Python"

3

Python

119

Introduction to Data Types

  • Data comes in different formats: numbers, letters, dates, symbols, etc.

  • Computers need to know the type of data to treat it correctly.

  • Example:

    • "a" + "b" → outputs "ab" (string concatenation).

    • 000123 stored as number → becomes 123.

    • If leading 0’s are needed, store it as string.


"123" differently from 123.

120

Multiple Choice

What will "7" + "3" output in Python?

1

10

2

73

3

Error

4

7 + 3

121

Common Data Types

    1. Integer → whole numbers (12, -5, 1000)

    2. Float (Real) → numbers with decimals (12.5, -10.9, 495.3)

    3. Character → single symbol ("A", "3", "@")

    4. String → collection of characters ("House", "Hello!", "123")

122

Multiple Choice

Which is NOT a valid Integer?

1

15

2

-8

3

0

4

3.5

123

Data Types in Python

  • Strings & characters must be inside quotation marks.

  • Python does not require explicit declaration of data type.

media

124

Multiple Choice

In Python, "15" is treated as:

1

Integer

2

String

3

Character

4

Float

125

Casting in Python

  • Casting = changing one data type to another.

  • Functions:

    • int() → changes to Integer

    • str() → changes to String

    • float() → changes to Real number

media

126

Is there an error?

Code:


"12" * 2 = 1212.

127

Multiple Choice

Which function converts a number to a String?

1

float()

2

int()

3

str()

4

cast()

128

Input in Python

  • input() lets user enter data.

  • Input is always stored as String by default.

  • Example:

media

129

Multiple Choice

Which of the following is an error in Python?

1

name = "Ali"

2

print("Hello", name)

3

total = 5 x 2

4

score = score + 1

130

Common Errors & Fixes

Mistakes happen often:

  1. Using == instead of = for assignment.

  2. Forgetting quotation marks for Strings.

  3. Using reserved words (input, print) as variable names.

  4. Wrong operator: x instead of *.

  5. Case sensitivity: Name ≠ name.

131

Multiple Choice

What data type does input() always return?

1

Integer

2

Float

3

String

4

Depends on input

132

Replace with sub-header

Replace this with your body text. Duplicate this text as many times as you would like. All provided templates can be reused multiple times. Wish you a good day.

Happy teaching!

133

1.6: Software Development and testing (pg 103 - 110)

134

Understanding and Fixing Errors in Python

This topic helps you learn how to make programs work correctly.

135

Why Errors Happen

When you write a program, sometimes it doesn’t run or doesn’t give the result you expected.
There are two main types of errors:

  • Syntax errors

  • Logic errors

💡 We need to find and fix these errors to make our program work correctly.

136

Example:
If your Python program stops with a
red error message — it’s usually a syntax error.

If it runs but gives the
wrong answer — it’s probably a logic error.

137

Multiple Choice

Which type of error stops a program from running?

1

Logic error

2

Syntax error

3

Runtime error

4

Calculation error

138

Syntax Error

A syntax error happens when your code breaks the rules of the programming language.

media
media

139

Remember!

Python is case-sensitive and requires correct punctuation and brackets.

media

140

Multiple Choice

Which of the following has a syntax error?

1

print("Hi")

2

print "Hi"

3

print("Hi!")

141

Syntax Error Activity

Activity: “Find and Fix the Errors”
Task for Students:

  • Identify the 3 syntax errors.

  • Rewrite the corrected code.

media

142

​Syntax Error Activity - Answer Key

Activity: “Find and Fix the Errors”

media

143

Logic Error

A logic error happens when your program runs, but the output is wrong.

media

​Logic Error Examples:
Wrong operator (+ instead of *)
Wrong variable name
Wrong order of steps

144

Multiple Choice

What happens when a program has a logic error?

1

It won’t run

2

It runs but gives the wrong result

3

It shows a red error message

145

​Logic Error Activity

Activity: Find and fix the logic error so that the program counts down from 5 to 1.

media

146

​Logic Error Activity - Answer

Activity: Find and fix the logic error so that the program counts down from 5 to 1.

​= means assign not equal to.

media

147

Debugging

“Debugging = important programmer skill.

Debugging is the process of finding and fixing errors or bugs in the source code

media

148

Debugging

media

​Ways to Debug:
Read your code line by line.
Write variable names and their values to check correctness.
Use a checklist for operators, variables, and order.

media

149

Multiple Choice

What is debugging?

1

The process of finding and fixing errors

2

Writing a new program

3

Saving your program

4

Testing hardware

150

Summary

  • Syntax errors break the rules of Python.

  • Logic errors make programs run incorrectly.

  • Debugging means finding and fixing errors.

  • Always test and re-test after fixing!

151

Programming task 1.26 - pg 107 (Debugging)

  • Program Goal: Add total items bought by 3 people

media

Task: Identify and fix the logic error.

152

Programming task 1.26 - pg 107 (Debugging)

  • Program Goal: Add total items bought by 3 people

media

153

Multiple Choice

Which error type makes a program stop running?

1
Syntax error
2
Logic error
3
Compilation error

154

Multiple Choice

Which error type gives a wrong output but no error message?

1
Syntax error
2
Logic error
3
Compilation error

155

Multiple Choice

What is the process of fixing program errors called?

1
Executing
2
Compiling
3
Debugging
4
Transpiling

156

Multiple Choice

When debugging, what is the first thing you should do?

1

Read your code line by line

2
Restart the application.
3
Check the documentation for solutions.
4
Ignore the error messages.

​Computational thinking and programming

By Soleha Majeed

Show answer

Auto Play

Slide 1 / 156

SLIDE