1 of 20

དཔལ་ལྡན་འབྲུག་གཞུང་། ཤེས་རིག་དང་རིག་རྩལ་གོང་འཕེལ་ལྷན་ཁག།

Department of School Education

Ministry of Education & Skills Development

Python Coding

January 2024

Class IX ICT Curriculum

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

2 of 20

FLOWCHART

Key Concept # 2

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

3 of 20

Coding Concept

Sub - Concepts

Flowchart

  • Definition of flowchart
  • Flowchart symbols and their purpose
  • Examples of flowchart
  • Converting algorithm to flowchart
  • Designing flowchart to simplify problems

Concept Overview

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

4 of 20

  • Define flowchart with examples.
  • Represent flowcharts using symbols.
  • Differentiate between algorithm and flowchart.
  • Design a flowchart for a given problem.
  • Explain the importance of creating flowchart to solve a problem.

Objectives

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

5 of 20

FLOWCHART

ACTIVITIES

  1. Understanding Flowchart
  2. Demo 1 - Adding Two Numbers
  3. Activity 1 - Perimeter of Rectangle
  4. Demo 2 - Eligibility for Voting
  5. Activity 2 - Even or Odd Number
  6. Activity 3 - Determining Pass or Fail
  7. Activity 4 - Check Your Understanding
  8. Activity 5 - Greatest of Three Numbers
  9. Activity 6 - Volume of Composite Shape

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

6 of 20

Flowchart

Flowchart is a diagrammatic representation of an algorithm.

Given alongside is an example of a flowchart to add two numbers

Various symbols are used to represent a flowchart

Read two numbers(x,y)

Add the two numbers

Display the sum

START

STOP

Terminal

Terminal

Input

Process

Output

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

7 of 20

Symbols Used in Flowchart

Symbol

Name

Function

Flow Line

To shows the flow of logic by connecting symbols

Terminal (Start/Stop)

Represent the starting and ending point of algorithm.

Input/Output

Used for Input or Output operation

Process

Processing

Decision

Used for decision making between two or more alternatives.

We use following symbols and shapes to create a flowchart.

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

8 of 20

Importance of Flowchart

It makes future modification of a program easier.

5

Helps to identify issues or logical errors in a program.

3

It helps in the decision-making processes.

2

Helps understand a program's structure and sequence of steps.

4

Breaks down a complex problem into smaller and manageable tasks.

1

January 2024

PYTHON

Key stage IV

Class IX

9 of 20

Demo 1 - Adding Two Numbers

Step

Algorithm

1

START

2

Read any two numbers(x and y)

3

Add x and y using + operator and assign the result to sum.

sum = x + y

4

Display sum

5

STOP

Create a flowchart for the given algorithm.

Solution

Read any two numbers(x,y)

Display the sum

sum=x+y

START

STOP

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

10 of 20

Activity 1 - Perimeter of Rectangle

Create a flowchart for the algorithm on calculating perimeter on your notebook.

Step

Algorithm

1

START

2

Read a length and width (l, w)

3

Perimeter = 2*(l+w) or perimeter = l+w+l+w

4

Print perimeter

5

STOP

Solution

Read length and width(l,w)

Display perimeter

perimeter=2*(l+w)

START

END

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

11 of 20

Demo 2 - Eligibility for Voting

Create a flowchart for the algorithm given below

on checking the eligibility of the voters.

Step

Algorithm

1

START.

2

Read age.

3

Check if age>=18, then go to step 4

4

Display ‘Eligible to vote’.

5

Otherwise, display ‘Not eligible to vote’.

6

STOP.

No

Enter age

Eligible to vote

Check age>=18

START

STOP

Not Eligible to vote

Yes

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

12 of 20

Activity 2 - Even or Odd Number

Step

Algorithm

1

START

2

Read a number(n)

3

Check if n%2!=0, then go to Step 4

4

Display “n is odd”

5

Otherwise, Display “n is even”

6

STOP

Design a flowchart for the given algorithm in your notebook.

Read n

n is odd

Check

n%2!=0

START

STOP

n is even

Yes

No

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

13 of 20

Activity 3 - Determining Pass or Fail

Step

Algorithm

1

START

2

Enter mark(m)

3

Check if m>=40, then go to step 4

4

Display “Pass”

5

Otherwise, Display “Fail”

6

STOP

Read m

Pass

Check

m>=40

START

STOP

Fail

Yes

No

Write an algorithm and draw a flowchart for a program that allows the user to

determine whether they have passed or failed in ICT when the pass mark is >= 40.

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

14 of 20

Activity 4 - Check Your Understanding

  1. Fill in the blanks
    1. Graphical representation or diagram that illustrates the sequence of steps or actions in a process is called ________.
    2. In flowchart _______________ symbol is used for decision making between two or more alternatives .
    3. Use ______ to connect different symbols in flowchart for the flow of logic.

flowchart

rhombus/diamond

arrows

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

15 of 20

Activity 4 - Check Your Understanding(cont.)

Step

Algorithm

1

Start

2

Read any numbers (x,y)

3

sub = x - y

4

Print sub

5

Stop/End

2. Distinguish between algorithm and flowchart with an example.

Read x, y

Display the sub

sub=x - y

START

END

Algorithm

Flowchart

An algorithm is a step-by-step set of instructions for performing a task.

Flowchart is a diagrammatic representation of an algorithm.

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

16 of 20

Activity 5 - Greatest of Three Numbers

Draw a flowchart to find the greatest of any three numbers entered by the user.

No

Read a,b,c

Display a is greatest

START

STOP

Check

a>b and a>c

Display b is greatest

Display c is greatest

Check

b>a and b>c

Yes

Yes

No

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

17 of 20

Activity 6 - Volume of Composite Shape

s

s

s

h

r

Kinley wants to find the volume of the composite shape shown below. Help Kinley to find the volume by (1) writing the algorithm and (2) drawing the flowchart to calculate the volume.

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

18 of 20

Activity 6 - Solution

Read s,r,h

Display Volume

Volume=(s**3)+(3.14*r**2*h)

START

STOP

Step

Algorithm

1

START

2

Read s,r,h

3

Volume = (s**3)+3.14*r**2*h

4

Display Volume

5

STOP

Algorithm and flowchart to calculate the volume of the given composite shape.

1

2

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

19 of 20

  • Flowchart is a diagrammatic representation of an algorithm.
  • Flowcharts helps to breaks down a complex problem into smaller and manageable tasks to facilitate decision making.
  • In flowchart, various symbols (given below) are be used to represent different elements.

Key Points

Symbol

Input &output

Process

Terminals

Decision

Flow line

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD

20 of 20

བཀྲིན་ཆེ།

THANK YOU

January 2024

PYTHON

Key stage IV

Class IX

© ICT Curriculum, MoESD