དཔལ་ལྡན་འབྲུག་གཞུང་། ཤེས་རིག་དང་རིག་རྩལ་གོང་འཕེལ་ལྷན་ཁག།
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
FLOWCHART
Key Concept # 2
January 2024
PYTHON
Key stage IV
Class IX
© ICT Curriculum, MoESD
Coding Concept | Sub - Concepts |
Flowchart |
|
Concept Overview
January 2024
PYTHON
Key stage IV
Class IX
© ICT Curriculum, MoESD
Objectives
January 2024
PYTHON
Key stage IV
Class IX
© ICT Curriculum, MoESD
FLOWCHART
ACTIVITIES
January 2024
PYTHON
Key stage IV
Class IX
© ICT Curriculum, MoESD
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
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
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
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
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
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
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
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
Activity 4 - Check Your Understanding
flowchart
rhombus/diamond
arrows
January 2024
PYTHON
Key stage IV
Class IX
© ICT Curriculum, MoESD
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
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
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
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
Key Points
Symbol |
|
Input &output
Process
Terminals
Decision
Flow line
January 2024
PYTHON
Key stage IV
Class IX
© ICT Curriculum, MoESD
བཀྲིན་ཆེ།
THANK YOU
January 2024
PYTHON
Key stage IV
Class IX
© ICT Curriculum, MoESD