SlideShare a Scribd company logo
L.O: SWBAT INTRODUCTION
TO FLOW CHARTS.
Sequences:
The most basic algorithm uses sequences
to present a list of instructions to be
followed one after the other, step by step.
An algorithm is a plan, a set of step-by-step instructions that a
computer follows to solve a problem.
To solve the problem, the instructions have to be followed in the right
order.
If the instructions are not carried out in the right order, you won’t get
the result you expected!
1.Start
2.unlock the door
3.open the door
4.enter the room
5.switch on the light
6.close the door behind you
7.stop
Selection:
1. IF the door is locked, THEN
unlock the door, ELSE do
nothing (go to next instruction)
2. IF the door is closed, THEN
open the door, ELSE do nothing
3. Enter the room
4. IF the room is dark, THEN
switch on the light, ELSE do
nothing
5. Close the door behind you
A selection is used to make choices based on information.
An algorithm can be made more intelligent by using IF, THEN
and ELSE to repeat instructions or move to different parts of
the program.
Iteration
• Iteration is the process of looping or repeating
sections of a program.
• There are two types of iteration: count-controlled
and condition-controlled.
• Count-controlled loops repeat the same steps a
specific number of times,
• regardless of the outcome.
• But a condition-controlled loop will keep repeating
the steps over and over…and over…and over…and
over, until it gets a specific result.
For loop (Count-controlled loop)
• The count-controlled loop can be described as a
FOR loop. The program repeats the action FOR a
number of times.
Here is an example using pseudocode:
Make “count” = 0
For as long as “count” is in the range of 0 to 5
Print “I am in loop number: ” and the value
contained in “count” together on a line
Increment “count” by 1
Condition-controlled loops
A program could be made more intelligent by
programming it to avoid hazards. For
example, if the robot vehicle is 3 cm from the
edge of the table and you tell it to move
forwards 5 cm, it will drive off the edge of the
table. To stop this from happening, you might
write a condition-controlled loop like this:
move forward
repeat until (touching table edge)
WHILE loops
Condition-controlled loops are also called WHILE
loops or WHILE-ENDWHILE statements. A WHILE
loop code is repeated based on a certain
condition. The condition could be 'true' or 'false'.
The WHILE loop executes while a condition is
true. Whether the condition is met or not is
checked at the beginning of the loop. If the
condition is 'true' it repeats, if not then the code
is not executed.
For example, to stop the robot from driving off
the edge of a table, you might write a WHILE loop
like this:
Move forward WHILE I am not
touching the table edge
DO WHILE loops
A similar condition-controlled loop is a DO
WHILE loop. This method differs from a
WHILE condition-controlled loop in that the
condition is checked at the end of the loop. If
the condition is ‘true’, the loop repeats.
Thus, the code in the loop is executed at
least once.
count = 1
do
print(count)
count+=1
while count <4
REPEAT UNTIL loops
REPEAT UNTIL loops are condition-controlled
loops that are found in older languages such as
BASIC or PASCAL. The principal is the same as a
DO WHILE loop, in that the condition is checked
at the end of the loop, thus the behaviour is the
same. Consider this pseudo-code example:
count = 1
repeat
print(count)
count+=1
until count >3
Infinite loops
Condition-controlled loops can result in
intentional or unintentional infinite loops. If we
wanted to loop indefinitely, we could set a
condition that would never be met, thus iterating
infinitely. The following examples would result in
an infinite loop:
Infinite loops
WHILE:
count = 1
while count <>0:
print(count)
count +=1
Infinite loops
DO WHILE:
count = 1
do
print(count)
count+=1
while count <>0
Infinite loops
REPEAT UNTIL:
count = 1
repeat
print(count)
count+=1
until count =0

More Related Content

What's hot

Economics unit 1 slide show
Economics unit 1 slide showEconomics unit 1 slide show
Economics unit 1 slide show
mndduvalld
 
The third level
The third levelThe third level
The third level
alkavashisht
 
Challenges of science and technology
Challenges of science and technologyChallenges of science and technology
Challenges of science and technology
Muneer Ahmed
 
The social cause of poverty
The social cause of povertyThe social cause of poverty
The social cause of poverty
Tanvir Ahmed Sakif
 
Footprints without feet
Footprints without feetFootprints without feet
Footprints without feet
Girish Arabbi
 
Child labour
Child labourChild labour
Child labour
Gaurav Sonani
 
Presentation on Child Labour
Presentation on Child Labour Presentation on Child Labour
Presentation on Child Labour
Jafor Sadik
 
Poverty slideshow
Poverty slideshowPoverty slideshow
Poverty slideshow
kraekerc
 
Poverty
PovertyPoverty
Poverty
See Jj
 
On if,countif,countifs,sumif,countifs,lookup,v lookup,index,match
On if,countif,countifs,sumif,countifs,lookup,v lookup,index,matchOn if,countif,countifs,sumif,countifs,lookup,v lookup,index,match
On if,countif,countifs,sumif,countifs,lookup,v lookup,index,match
Rakesh Sah
 
Excel IF function
Excel IF functionExcel IF function
Excel IF function
Htay Aung
 
CHILD LABOR
CHILD LABOR CHILD LABOR
CHILD LABOR
Shadman Sakib Chayan
 
Third level
Third levelThird level
Save water
Save waterSave water
Save water
Arun Gupta
 
Hexadecimal base 16
Hexadecimal base 16Hexadecimal base 16
Hexadecimal base 16
smar300
 
The invisible hand
The invisible handThe invisible hand
The invisible hand
Akash Shrestha
 
Chapter1 3
Chapter1 3Chapter1 3
Chapter1 3
Angelito Pera
 
The Art and Science of Economics
The Art and Science of EconomicsThe Art and Science of Economics
The Art and Science of Economics
mandalina landy
 
For anne gregory
For anne gregoryFor anne gregory
For anne gregory
NVSBPL
 
Child labour in india
Child labour in indiaChild labour in india
Child labour in india
askmee
 

What's hot (20)

Economics unit 1 slide show
Economics unit 1 slide showEconomics unit 1 slide show
Economics unit 1 slide show
 
The third level
The third levelThe third level
The third level
 
Challenges of science and technology
Challenges of science and technologyChallenges of science and technology
Challenges of science and technology
 
The social cause of poverty
The social cause of povertyThe social cause of poverty
The social cause of poverty
 
Footprints without feet
Footprints without feetFootprints without feet
Footprints without feet
 
Child labour
Child labourChild labour
Child labour
 
Presentation on Child Labour
Presentation on Child Labour Presentation on Child Labour
Presentation on Child Labour
 
Poverty slideshow
Poverty slideshowPoverty slideshow
Poverty slideshow
 
Poverty
PovertyPoverty
Poverty
 
On if,countif,countifs,sumif,countifs,lookup,v lookup,index,match
On if,countif,countifs,sumif,countifs,lookup,v lookup,index,matchOn if,countif,countifs,sumif,countifs,lookup,v lookup,index,match
On if,countif,countifs,sumif,countifs,lookup,v lookup,index,match
 
Excel IF function
Excel IF functionExcel IF function
Excel IF function
 
CHILD LABOR
CHILD LABOR CHILD LABOR
CHILD LABOR
 
Third level
Third levelThird level
Third level
 
Save water
Save waterSave water
Save water
 
Hexadecimal base 16
Hexadecimal base 16Hexadecimal base 16
Hexadecimal base 16
 
The invisible hand
The invisible handThe invisible hand
The invisible hand
 
Chapter1 3
Chapter1 3Chapter1 3
Chapter1 3
 
The Art and Science of Economics
The Art and Science of EconomicsThe Art and Science of Economics
The Art and Science of Economics
 
For anne gregory
For anne gregoryFor anne gregory
For anne gregory
 
Child labour in india
Child labour in indiaChild labour in india
Child labour in india
 

Similar to Lesson flow charts 1

ACM init() Day 3
ACM init() Day 3ACM init() Day 3
Loops
LoopsLoops
loops and iteration.docx
loops and iteration.docxloops and iteration.docx
loops and iteration.docx
JavvajiVenkat
 
Init() Lesson 3
Init() Lesson 3Init() Lesson 3
While loop
While loopWhile loop
While loop
RabiyaZhexembayeva
 
Notes2
Notes2Notes2
Notes2
hccit
 
Loop and while Loop
Loop and while LoopLoop and while Loop
Loop and while Loop
JayBhavsar68
 
Going loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptxGoing loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptx
Amy Nightingale
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
Krishna Chaytaniah
 
Introduction to loops cpu
Introduction to loops  cpuIntroduction to loops  cpu
Introduction to loops cpu
Harsh Gupta
 
Loops c++
Loops c++Loops c++
Loops c++
Shivani Singh
 
Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7
Mohd Harris Ahmad Jaal
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
monicafrancis71118
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
Mohammed Sikander
 
Loops in Python.pptx
Loops in Python.pptxLoops in Python.pptx
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in college
ssuser7a7cd61
 
While_for_loop presententationin first year students
While_for_loop presententationin first year studentsWhile_for_loop presententationin first year students
While_for_loop presententationin first year students
SIHIGOPAL
 
Small Basic - Branching and Loop
Small Basic - Branching and LoopSmall Basic - Branching and Loop
Small Basic - Branching and Loop
Grayzon Gonzales, LPT
 
Algorithm Designs - Control Structures
Algorithm Designs - Control StructuresAlgorithm Designs - Control Structures
Algorithm Designs - Control Structures
hatredai
 
Programming loop
Programming loopProgramming loop
Programming loop
University of Potsdam
 

Similar to Lesson flow charts 1 (20)

ACM init() Day 3
ACM init() Day 3ACM init() Day 3
ACM init() Day 3
 
Loops
LoopsLoops
Loops
 
loops and iteration.docx
loops and iteration.docxloops and iteration.docx
loops and iteration.docx
 
Init() Lesson 3
Init() Lesson 3Init() Lesson 3
Init() Lesson 3
 
While loop
While loopWhile loop
While loop
 
Notes2
Notes2Notes2
Notes2
 
Loop and while Loop
Loop and while LoopLoop and while Loop
Loop and while Loop
 
Going loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptxGoing loopy - Introduction to Loops.pptx
Going loopy - Introduction to Loops.pptx
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
 
Introduction to loops cpu
Introduction to loops  cpuIntroduction to loops  cpu
Introduction to loops cpu
 
Loops c++
Loops c++Loops c++
Loops c++
 
Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7Fundamentals of Programming Chapter 7
Fundamentals of Programming Chapter 7
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
 
Loops in Python.pptx
Loops in Python.pptxLoops in Python.pptx
Loops in Python.pptx
 
While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in college
 
While_for_loop presententationin first year students
While_for_loop presententationin first year studentsWhile_for_loop presententationin first year students
While_for_loop presententationin first year students
 
Small Basic - Branching and Loop
Small Basic - Branching and LoopSmall Basic - Branching and Loop
Small Basic - Branching and Loop
 
Algorithm Designs - Control Structures
Algorithm Designs - Control StructuresAlgorithm Designs - Control Structures
Algorithm Designs - Control Structures
 
Programming loop
Programming loopProgramming loop
Programming loop
 

More from Lexume1

Lesson flow charts 2
Lesson flow charts 2Lesson flow charts 2
Lesson flow charts 2
Lexume1
 
Ap exam big idea 7 global impact
Ap exam big idea 7 global impactAp exam big idea 7 global impact
Ap exam big idea 7 global impact
Lexume1
 
Lesson pseudocode
Lesson  pseudocodeLesson  pseudocode
Lesson pseudocode
Lexume1
 
Ap exam big idea 6 the internet
Ap exam big idea 6 the internetAp exam big idea 6 the internet
Ap exam big idea 6 the internet
Lexume1
 
Ap exam big idea 5 programming
Ap exam big idea 5 programmingAp exam big idea 5 programming
Ap exam big idea 5 programming
Lexume1
 
Ap exam big idea 4 algorithms
Ap exam big idea 4 algorithmsAp exam big idea 4 algorithms
Ap exam big idea 4 algorithms
Lexume1
 
Ap exam big idea 3 data and information
Ap exam big idea 3 data and informationAp exam big idea 3 data and information
Ap exam big idea 3 data and information
Lexume1
 
Ap exam big idea 2 abstraction
Ap exam big idea 2 abstractionAp exam big idea 2 abstraction
Ap exam big idea 2 abstraction
Lexume1
 
Lesson4.4 u4 l1 using hex
Lesson4.4 u4 l1 using hexLesson4.4 u4 l1 using hex
Lesson4.4 u4 l1 using hex
Lexume1
 
Lesson4.3 u4 l1 hexadecimal representation
Lesson4.3 u4 l1 hexadecimal representationLesson4.3 u4 l1 hexadecimal representation
Lesson4.3 u4 l1 hexadecimal representation
Lexume1
 
Lesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squencesLesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squences
Lexume1
 
Lesson4.1 u4 l1 binary representation
Lesson4.1 u4 l1 binary representationLesson4.1 u4 l1 binary representation
Lesson4.1 u4 l1 binary representation
Lexume1
 
Lesson4.0 unit 4 the internet and global impact
Lesson4.0 unit 4  the internet and global impactLesson4.0 unit 4  the internet and global impact
Lesson4.0 unit 4 the internet and global impact
Lexume1
 
Lesson4.9 d u4l3 hierarchy of open protocols
Lesson4.9 d u4l3 hierarchy of open protocolsLesson4.9 d u4l3 hierarchy of open protocols
Lesson4.9 d u4l3 hierarchy of open protocols
Lexume1
 
Lesson4.9 c u4l3 tcp (transmission control protocol)
Lesson4.9 c u4l3 tcp (transmission control protocol)Lesson4.9 c u4l3 tcp (transmission control protocol)
Lesson4.9 c u4l3 tcp (transmission control protocol)
Lexume1
 
Lesson4.9 b u4l3 ip addresses
Lesson4.9 b u4l3 ip addressesLesson4.9 b u4l3 ip addresses
Lesson4.9 b u4l3 ip addresses
Lexume1
 
Lesson4.9 a u4l2 html
Lesson4.9 a u4l2 htmlLesson4.9 a u4l2 html
Lesson4.9 a u4l2 html
Lexume1
 
Lesson4.8 u4 l2 address hierarchy
Lesson4.8 u4 l2 address hierarchyLesson4.8 u4 l2 address hierarchy
Lesson4.8 u4 l2 address hierarchy
Lexume1
 
Lesson4.7 u4 l2 network redundancy
Lesson4.7 u4 l2 network redundancyLesson4.7 u4 l2 network redundancy
Lesson4.7 u4 l2 network redundancy
Lexume1
 
Lesson4.6 u4 l2 what is the internet?
Lesson4.6 u4 l2 what is the internet?Lesson4.6 u4 l2 what is the internet?
Lesson4.6 u4 l2 what is the internet?
Lexume1
 

More from Lexume1 (20)

Lesson flow charts 2
Lesson flow charts 2Lesson flow charts 2
Lesson flow charts 2
 
Ap exam big idea 7 global impact
Ap exam big idea 7 global impactAp exam big idea 7 global impact
Ap exam big idea 7 global impact
 
Lesson pseudocode
Lesson  pseudocodeLesson  pseudocode
Lesson pseudocode
 
Ap exam big idea 6 the internet
Ap exam big idea 6 the internetAp exam big idea 6 the internet
Ap exam big idea 6 the internet
 
Ap exam big idea 5 programming
Ap exam big idea 5 programmingAp exam big idea 5 programming
Ap exam big idea 5 programming
 
Ap exam big idea 4 algorithms
Ap exam big idea 4 algorithmsAp exam big idea 4 algorithms
Ap exam big idea 4 algorithms
 
Ap exam big idea 3 data and information
Ap exam big idea 3 data and informationAp exam big idea 3 data and information
Ap exam big idea 3 data and information
 
Ap exam big idea 2 abstraction
Ap exam big idea 2 abstractionAp exam big idea 2 abstraction
Ap exam big idea 2 abstraction
 
Lesson4.4 u4 l1 using hex
Lesson4.4 u4 l1 using hexLesson4.4 u4 l1 using hex
Lesson4.4 u4 l1 using hex
 
Lesson4.3 u4 l1 hexadecimal representation
Lesson4.3 u4 l1 hexadecimal representationLesson4.3 u4 l1 hexadecimal representation
Lesson4.3 u4 l1 hexadecimal representation
 
Lesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squencesLesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squences
 
Lesson4.1 u4 l1 binary representation
Lesson4.1 u4 l1 binary representationLesson4.1 u4 l1 binary representation
Lesson4.1 u4 l1 binary representation
 
Lesson4.0 unit 4 the internet and global impact
Lesson4.0 unit 4  the internet and global impactLesson4.0 unit 4  the internet and global impact
Lesson4.0 unit 4 the internet and global impact
 
Lesson4.9 d u4l3 hierarchy of open protocols
Lesson4.9 d u4l3 hierarchy of open protocolsLesson4.9 d u4l3 hierarchy of open protocols
Lesson4.9 d u4l3 hierarchy of open protocols
 
Lesson4.9 c u4l3 tcp (transmission control protocol)
Lesson4.9 c u4l3 tcp (transmission control protocol)Lesson4.9 c u4l3 tcp (transmission control protocol)
Lesson4.9 c u4l3 tcp (transmission control protocol)
 
Lesson4.9 b u4l3 ip addresses
Lesson4.9 b u4l3 ip addressesLesson4.9 b u4l3 ip addresses
Lesson4.9 b u4l3 ip addresses
 
Lesson4.9 a u4l2 html
Lesson4.9 a u4l2 htmlLesson4.9 a u4l2 html
Lesson4.9 a u4l2 html
 
Lesson4.8 u4 l2 address hierarchy
Lesson4.8 u4 l2 address hierarchyLesson4.8 u4 l2 address hierarchy
Lesson4.8 u4 l2 address hierarchy
 
Lesson4.7 u4 l2 network redundancy
Lesson4.7 u4 l2 network redundancyLesson4.7 u4 l2 network redundancy
Lesson4.7 u4 l2 network redundancy
 
Lesson4.6 u4 l2 what is the internet?
Lesson4.6 u4 l2 what is the internet?Lesson4.6 u4 l2 what is the internet?
Lesson4.6 u4 l2 what is the internet?
 

Recently uploaded

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 

Recently uploaded (20)

How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 

Lesson flow charts 1

  • 2. Sequences: The most basic algorithm uses sequences to present a list of instructions to be followed one after the other, step by step. An algorithm is a plan, a set of step-by-step instructions that a computer follows to solve a problem. To solve the problem, the instructions have to be followed in the right order. If the instructions are not carried out in the right order, you won’t get the result you expected! 1.Start 2.unlock the door 3.open the door 4.enter the room 5.switch on the light 6.close the door behind you 7.stop
  • 3. Selection: 1. IF the door is locked, THEN unlock the door, ELSE do nothing (go to next instruction) 2. IF the door is closed, THEN open the door, ELSE do nothing 3. Enter the room 4. IF the room is dark, THEN switch on the light, ELSE do nothing 5. Close the door behind you A selection is used to make choices based on information. An algorithm can be made more intelligent by using IF, THEN and ELSE to repeat instructions or move to different parts of the program.
  • 4. Iteration • Iteration is the process of looping or repeating sections of a program. • There are two types of iteration: count-controlled and condition-controlled. • Count-controlled loops repeat the same steps a specific number of times, • regardless of the outcome. • But a condition-controlled loop will keep repeating the steps over and over…and over…and over…and over, until it gets a specific result.
  • 5. For loop (Count-controlled loop) • The count-controlled loop can be described as a FOR loop. The program repeats the action FOR a number of times. Here is an example using pseudocode: Make “count” = 0 For as long as “count” is in the range of 0 to 5 Print “I am in loop number: ” and the value contained in “count” together on a line Increment “count” by 1
  • 6. Condition-controlled loops A program could be made more intelligent by programming it to avoid hazards. For example, if the robot vehicle is 3 cm from the edge of the table and you tell it to move forwards 5 cm, it will drive off the edge of the table. To stop this from happening, you might write a condition-controlled loop like this: move forward repeat until (touching table edge)
  • 7. WHILE loops Condition-controlled loops are also called WHILE loops or WHILE-ENDWHILE statements. A WHILE loop code is repeated based on a certain condition. The condition could be 'true' or 'false'. The WHILE loop executes while a condition is true. Whether the condition is met or not is checked at the beginning of the loop. If the condition is 'true' it repeats, if not then the code is not executed. For example, to stop the robot from driving off the edge of a table, you might write a WHILE loop like this: Move forward WHILE I am not touching the table edge
  • 8. DO WHILE loops A similar condition-controlled loop is a DO WHILE loop. This method differs from a WHILE condition-controlled loop in that the condition is checked at the end of the loop. If the condition is ‘true’, the loop repeats. Thus, the code in the loop is executed at least once. count = 1 do print(count) count+=1 while count <4
  • 9. REPEAT UNTIL loops REPEAT UNTIL loops are condition-controlled loops that are found in older languages such as BASIC or PASCAL. The principal is the same as a DO WHILE loop, in that the condition is checked at the end of the loop, thus the behaviour is the same. Consider this pseudo-code example: count = 1 repeat print(count) count+=1 until count >3
  • 10. Infinite loops Condition-controlled loops can result in intentional or unintentional infinite loops. If we wanted to loop indefinitely, we could set a condition that would never be met, thus iterating infinitely. The following examples would result in an infinite loop:
  • 11. Infinite loops WHILE: count = 1 while count <>0: print(count) count +=1
  • 12. Infinite loops DO WHILE: count = 1 do print(count) count+=1 while count <>0
  • 13. Infinite loops REPEAT UNTIL: count = 1 repeat print(count) count+=1 until count =0