SlideShare une entreprise Scribd logo
1  sur  7
Télécharger pour lire hors ligne
Flowcharts and Algorithms
A brief overview
NXT-G is a programming language designed to help students and adults alike easily and quickly become familiar with
programming.
The following exercise is designed to give you a quick introduction to programming as well as to understand your
quick grasp of programming ideas. Attached to “Pleo” images are questions. In the boxes, please write
your answers.
Pleo the Dinosaur Robot.
Figure 1: Image source: http://images.amazon.com/images/G/01/electronics/detail-page/B000RWEGCO-2-med.jpg
Imagine that Pleo is your personal pet dinosaur robot. Pleo understands GO, FORWARD, BACKWARD, TURN,
LEFT, RIGHT, FEET, and STOP. When you say “GO FORWARD 3 FEET”, Pleo goes forward 3 feet as Pleo understands
numbers. When you say “TURN LEFT”, Pleo turns left.
Problem 1:
When you say “GO HOME”, Pleo does not respond. WHY?
Problem 2:
Pleo is in my living room. We are expecting visitors and my mom would like me to clean the living room
and put Pleo in my bedroom. Pleo is heavy but good at following directions. Can you help me by giving
him directions to my bedroom?
Problem 3:
What will happen if when Pleo is in my living room, I give him directions “GO FORWARD 12 FEET”?
Problem 4: Living-room: A program:
The next day my mom says, “Your room is a mess, clean up your room.” And this goes on and on. Pleo
moves between the living room and dining room, and I get tired of giving him instructions. I looked up
the manual and found that I could teach Pleo new words and write a “program” in the language that he understands.
I have to be careful, for the language Pleo understands is more than words, there is a specific rule to put the words
together.
How can I write “Living-room” a program that contains a series of instructions to move Pleo from my bedroom to the
living room?
The above exercises present a logical flow of sequence or instructions that a program, or in this case, a robot should
follow. The steps as written represent an algorithm, which closely resembles the English language.Than
Color of
the ball
Is
False
True
Introduction to flowcharts
A flowchart is a graphical representation of an algorithm. A flowchart shows the sequential flow of process a
program, or in this case, a robot should follow. Flowcharts play a vital role in the programming of a problem and are
quite helpful in understanding the logic of complicated and lengthy problems. Flowcharts support the programming
of an idea and are not specific to a given computer programing language. In addition, they are a quick and powerful
visual tool. Thus a flowchart is a preferred documentation of any program.
Flowcharts are usually drawn using some standard symbols; however,
Start or end of the program
Steps to be executed
Input or output operation, used to refer to data and sensorial input
Decision making and branching, is usually a true or false
Connector or joining of two parts of program, especially useful in long
programs
The accepted guidelines in flowcharting are:
a. Logical sequence should be followed.
b. The usual direction of the flow of a procedure or system is from left to right or top to bottom.
c. Only one flow line should go into and come out from a process symbol, connector, or input/output.
or
e. Only one flow line can enter a decision symbol, but
two or three flow lines, one for each possible answer,
should leave the decision symbol.
f. Only one flow line is used in conjunction with terminal
symbol.
Examples of flowchart
1. Move forward 10 steps
 In this flowchart, what is the first action that our robot will do?
 If the robot has completed 10 steps, what will the robot do?
2. Sort the ball by color
 In this program, what will happen when the robot sees a red ball?
 In this program, what will happen when the robot sees a green ball?
 In this program, what will happen when the robot sees a blue ball?
 What modification does your program need to sort the balls accurately?
 What modification does your program need to sort the balls repeatedly?
Start Move forward
1 step
Forward
10 steps?
Stop
Yes
No
Start Is the ball
blue?
Yes
No
Read ball
color Store left
Store right
Repetition of a certain set of commands
The driver of the bus drives to a stop. At the stop he issues tickets to the passengers. Then the driver proceeds to the
next stop and repeats the process from the first to the last stop. The following flowchart shows how a set of
repeated conditions are contained within a set of commands.
Decision based on 2 or more criteria
Many programs draw decisions on multiple criteria which happen in parallel. A train can leave the station when all
passengers have boarded or the train has remained at the stop for 30 seconds. How can the given situation be
depicted in a flowchart?
The response can be summed up as an either/or algorithm:
 Go to next station
 If passengers have boarded or if train has stopped at the station for 30 seconds, move to next station.
Complete the instructions for this flowchart by:
Start
Go to next
stop
Passenger?
Issue
ticket
Last stop
Yes
Yes
No
No
Stop
Start ????????? Either/or
condition
Stop
Yes
No
1. Setting up a timer input
2. Setting up the sensor input to check on the passengers.

Contenu connexe

En vedette

Gears: Lego Mindstorms
Gears: Lego MindstormsGears: Lego Mindstorms
Gears: Lego Mindstormsasrctw
 
What happened to Gaza during the 1967 war?
What happened to Gaza during the 1967 war?What happened to Gaza during the 1967 war?
What happened to Gaza during the 1967 war?Ahmed Al Qarot
 
October War_Effective Egyptian Preprarations Enable Strategic Surprise
October War_Effective Egyptian Preprarations Enable Strategic SurpriseOctober War_Effective Egyptian Preprarations Enable Strategic Surprise
October War_Effective Egyptian Preprarations Enable Strategic SurpriseW. Troy Ayres
 
Us involvement in the vietnam war 1
Us involvement in the vietnam war 1Us involvement in the vietnam war 1
Us involvement in the vietnam war 1lguntup
 
D3 (drought management and risk reduction in pakistan) brig. kamran shariff
D3 (drought management and risk reduction in pakistan)  brig. kamran shariffD3 (drought management and risk reduction in pakistan)  brig. kamran shariff
D3 (drought management and risk reduction in pakistan) brig. kamran shariffmuneeb khalid khalid muneeb
 
The Social Corporate Revolution
The Social Corporate Revolution   The Social Corporate Revolution
The Social Corporate Revolution Stefano Mizzella
 
Technical Properties of A Nuclear Power Plant
Technical Properties of A Nuclear Power PlantTechnical Properties of A Nuclear Power Plant
Technical Properties of A Nuclear Power PlantCan Görkem Ünal
 
1948 Arab–Israeli
1948 Arab–Israeli1948 Arab–Israeli
1948 Arab–Israelijakblack
 
Topic.09 The Civil Rights Movement
Topic.09 The Civil Rights MovementTopic.09 The Civil Rights Movement
Topic.09 The Civil Rights Movementmr.meechin
 
Nuclear power
Nuclear powerNuclear power
Nuclear powerAparna
 
Similarities
SimilaritiesSimilarities
Similaritiesippnw
 
Cold war Photo Essay World History
Cold war Photo Essay World HistoryCold war Photo Essay World History
Cold war Photo Essay World HistoryTorresTroll
 
Report on HISTORY OF MONEY IN CHINA
Report on HISTORY OF MONEY IN CHINAReport on HISTORY OF MONEY IN CHINA
Report on HISTORY OF MONEY IN CHINATayyab Farooq
 
Heroines And Heroes Of Sindh Long March
Heroines And Heroes Of Sindh Long MarchHeroines And Heroes Of Sindh Long March
Heroines And Heroes Of Sindh Long Marchguestf7ae21
 
Algorithms Vs Meta Language
Algorithms Vs Meta LanguageAlgorithms Vs Meta Language
Algorithms Vs Meta LanguageKelly Bauer
 
Inventions: The computer
Inventions: The computerInventions: The computer
Inventions: The computerandreasupertino
 

En vedette (20)

Gears: Lego Mindstorms
Gears: Lego MindstormsGears: Lego Mindstorms
Gears: Lego Mindstorms
 
What happened to Gaza during the 1967 war?
What happened to Gaza during the 1967 war?What happened to Gaza during the 1967 war?
What happened to Gaza during the 1967 war?
 
October War_Effective Egyptian Preprarations Enable Strategic Surprise
October War_Effective Egyptian Preprarations Enable Strategic SurpriseOctober War_Effective Egyptian Preprarations Enable Strategic Surprise
October War_Effective Egyptian Preprarations Enable Strategic Surprise
 
Us involvement in the vietnam war 1
Us involvement in the vietnam war 1Us involvement in the vietnam war 1
Us involvement in the vietnam war 1
 
D3 (drought management and risk reduction in pakistan) brig. kamran shariff
D3 (drought management and risk reduction in pakistan)  brig. kamran shariffD3 (drought management and risk reduction in pakistan)  brig. kamran shariff
D3 (drought management and risk reduction in pakistan) brig. kamran shariff
 
The Social Corporate Revolution
The Social Corporate Revolution   The Social Corporate Revolution
The Social Corporate Revolution
 
WWI 5 Weapons
WWI 5 WeaponsWWI 5 Weapons
WWI 5 Weapons
 
Technical Properties of A Nuclear Power Plant
Technical Properties of A Nuclear Power PlantTechnical Properties of A Nuclear Power Plant
Technical Properties of A Nuclear Power Plant
 
1948 Arab–Israeli
1948 Arab–Israeli1948 Arab–Israeli
1948 Arab–Israeli
 
Topic.09 The Civil Rights Movement
Topic.09 The Civil Rights MovementTopic.09 The Civil Rights Movement
Topic.09 The Civil Rights Movement
 
Lesson 3 fundamentalism
Lesson 3   fundamentalismLesson 3   fundamentalism
Lesson 3 fundamentalism
 
Nuclear power
Nuclear powerNuclear power
Nuclear power
 
27 NP Completness
27 NP Completness27 NP Completness
27 NP Completness
 
Similarities
SimilaritiesSimilarities
Similarities
 
Cold war Photo Essay World History
Cold war Photo Essay World HistoryCold war Photo Essay World History
Cold war Photo Essay World History
 
Hemp History China
Hemp History ChinaHemp History China
Hemp History China
 
Report on HISTORY OF MONEY IN CHINA
Report on HISTORY OF MONEY IN CHINAReport on HISTORY OF MONEY IN CHINA
Report on HISTORY OF MONEY IN CHINA
 
Heroines And Heroes Of Sindh Long March
Heroines And Heroes Of Sindh Long MarchHeroines And Heroes Of Sindh Long March
Heroines And Heroes Of Sindh Long March
 
Algorithms Vs Meta Language
Algorithms Vs Meta LanguageAlgorithms Vs Meta Language
Algorithms Vs Meta Language
 
Inventions: The computer
Inventions: The computerInventions: The computer
Inventions: The computer
 

Similaire à Introduction to flowcharts and algorithms

Coding io1--materials for students-group6
Coding io1--materials for students-group6Coding io1--materials for students-group6
Coding io1--materials for students-group6Georgeta Manafu
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithmrajkumar1631010038
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithmsStudent
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptMuhammadAbdullah311866
 
10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechzShahbaz Ahmad
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartdipti reya
 
GRADE 6 ALGORITHM.pptx
GRADE 6 ALGORITHM.pptxGRADE 6 ALGORITHM.pptx
GRADE 6 ALGORITHM.pptxAllanGuevarra1
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxRusherGamer1
 
Getting Started with Robotics
Getting Started with RoboticsGetting Started with Robotics
Getting Started with Roboticss0133116
 
The secret of Functional Programming revealed!
The secret of Functional Programming revealed!The secret of Functional Programming revealed!
The secret of Functional Programming revealed!Torbjørn Marø
 
Small Basic Calculator Apps lesson
Small Basic Calculator Apps lessonSmall Basic Calculator Apps lesson
Small Basic Calculator Apps lessonEdujetage
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review GuideBenjamin Kissinger
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsRuth Marvin
 
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...Lucky Gods
 

Similaire à Introduction to flowcharts and algorithms (20)

Introductoin to Python.ppt
Introductoin to Python.pptIntroductoin to Python.ppt
Introductoin to Python.ppt
 
Coding io1--materials for students-group6
Coding io1--materials for students-group6Coding io1--materials for students-group6
Coding io1--materials for students-group6
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithms
 
Interm Progr
Interm ProgrInterm Progr
Interm Progr
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.ppt
 
10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
GRADE 6 ALGORITHM.pptx
GRADE 6 ALGORITHM.pptxGRADE 6 ALGORITHM.pptx
GRADE 6 ALGORITHM.pptx
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
 
Getting Started with Robotics
Getting Started with RoboticsGetting Started with Robotics
Getting Started with Robotics
 
Lab a
Lab aLab a
Lab a
 
The secret of Functional Programming revealed!
The secret of Functional Programming revealed!The secret of Functional Programming revealed!
The secret of Functional Programming revealed!
 
Small Basic Calculator Apps lesson
Small Basic Calculator Apps lessonSmall Basic Calculator Apps lesson
Small Basic Calculator Apps lesson
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review Guide
 
Mastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loopsMastering Python lesson3b_for_loops
Mastering Python lesson3b_for_loops
 
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
Mastering Python : 100+ Solved and Commented Exercises to Accelerate Your Lea...
 
Introducing Scratch
Introducing ScratchIntroducing Scratch
Introducing Scratch
 

Dernier

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 

Dernier (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Introduction to flowcharts and algorithms

  • 1. Flowcharts and Algorithms A brief overview NXT-G is a programming language designed to help students and adults alike easily and quickly become familiar with programming. The following exercise is designed to give you a quick introduction to programming as well as to understand your quick grasp of programming ideas. Attached to “Pleo” images are questions. In the boxes, please write your answers. Pleo the Dinosaur Robot. Figure 1: Image source: http://images.amazon.com/images/G/01/electronics/detail-page/B000RWEGCO-2-med.jpg Imagine that Pleo is your personal pet dinosaur robot. Pleo understands GO, FORWARD, BACKWARD, TURN, LEFT, RIGHT, FEET, and STOP. When you say “GO FORWARD 3 FEET”, Pleo goes forward 3 feet as Pleo understands numbers. When you say “TURN LEFT”, Pleo turns left. Problem 1: When you say “GO HOME”, Pleo does not respond. WHY?
  • 2. Problem 2: Pleo is in my living room. We are expecting visitors and my mom would like me to clean the living room and put Pleo in my bedroom. Pleo is heavy but good at following directions. Can you help me by giving him directions to my bedroom?
  • 3. Problem 3: What will happen if when Pleo is in my living room, I give him directions “GO FORWARD 12 FEET”? Problem 4: Living-room: A program: The next day my mom says, “Your room is a mess, clean up your room.” And this goes on and on. Pleo moves between the living room and dining room, and I get tired of giving him instructions. I looked up the manual and found that I could teach Pleo new words and write a “program” in the language that he understands. I have to be careful, for the language Pleo understands is more than words, there is a specific rule to put the words together. How can I write “Living-room” a program that contains a series of instructions to move Pleo from my bedroom to the living room? The above exercises present a logical flow of sequence or instructions that a program, or in this case, a robot should follow. The steps as written represent an algorithm, which closely resembles the English language.Than
  • 4. Color of the ball Is False True Introduction to flowcharts A flowchart is a graphical representation of an algorithm. A flowchart shows the sequential flow of process a program, or in this case, a robot should follow. Flowcharts play a vital role in the programming of a problem and are quite helpful in understanding the logic of complicated and lengthy problems. Flowcharts support the programming of an idea and are not specific to a given computer programing language. In addition, they are a quick and powerful visual tool. Thus a flowchart is a preferred documentation of any program. Flowcharts are usually drawn using some standard symbols; however, Start or end of the program Steps to be executed Input or output operation, used to refer to data and sensorial input Decision making and branching, is usually a true or false Connector or joining of two parts of program, especially useful in long programs The accepted guidelines in flowcharting are: a. Logical sequence should be followed. b. The usual direction of the flow of a procedure or system is from left to right or top to bottom. c. Only one flow line should go into and come out from a process symbol, connector, or input/output. or e. Only one flow line can enter a decision symbol, but two or three flow lines, one for each possible answer, should leave the decision symbol. f. Only one flow line is used in conjunction with terminal symbol.
  • 5. Examples of flowchart 1. Move forward 10 steps  In this flowchart, what is the first action that our robot will do?  If the robot has completed 10 steps, what will the robot do? 2. Sort the ball by color  In this program, what will happen when the robot sees a red ball?  In this program, what will happen when the robot sees a green ball?  In this program, what will happen when the robot sees a blue ball?  What modification does your program need to sort the balls accurately?  What modification does your program need to sort the balls repeatedly? Start Move forward 1 step Forward 10 steps? Stop Yes No Start Is the ball blue? Yes No Read ball color Store left Store right
  • 6. Repetition of a certain set of commands The driver of the bus drives to a stop. At the stop he issues tickets to the passengers. Then the driver proceeds to the next stop and repeats the process from the first to the last stop. The following flowchart shows how a set of repeated conditions are contained within a set of commands. Decision based on 2 or more criteria Many programs draw decisions on multiple criteria which happen in parallel. A train can leave the station when all passengers have boarded or the train has remained at the stop for 30 seconds. How can the given situation be depicted in a flowchart? The response can be summed up as an either/or algorithm:  Go to next station  If passengers have boarded or if train has stopped at the station for 30 seconds, move to next station. Complete the instructions for this flowchart by: Start Go to next stop Passenger? Issue ticket Last stop Yes Yes No No Stop Start ????????? Either/or condition Stop Yes No
  • 7. 1. Setting up a timer input 2. Setting up the sensor input to check on the passengers.