SlideShare a Scribd company logo
1 of 30
What is pseudocode?
 List of steps written in English
 Like the instructions for a recipe
 Must be in the right sequence
 Imagine saying “bake the cake” and then “mix it up”
Sample Pseudocode
 Task: add two numbers
 Pseudocode:
 Start
 Get two numbers
 Get first number
 Get second number
 Add them
 Print the answer
 End
Invitation to Computer Science,
Java Version, Third Edition 4
Pseudocode
 English language constructs modeled to look like
statements available in most programming
languages
 Steps presented in a structured manner
(numbered, indented, and so on)
 No fixed syntax for most operations is required
Invitation to Computer Science,
Java Version, Third Edition 5
Pseudocode (continued)
 Less ambiguous and more readable than natural
language
 Emphasis is on process, not notation
 Well-understood forms allow logical reasoning
about algorithm behavior
 Can be easily translated into a programming
language
Sample Pseudocode
 Task: add two numbers
 Pseudocode:
 Start
 Get two numbers
 Get first number
 Get second number
 Add them
 Print the answer
 End
What does a flowchart look like?
 The pseudocode from the previous slide would look
like this as a flowchart:
Start
Get 2 numbers
Add them
Print answer
End
What are those funny symbols?
 START/END
 INPUT/OUTPUT
 PROCESS
 DECISION
What are those funny symbols?
 START/END
 Used at the beginning
and end of each
flowchart.
 INPUT/OUTPUT
 Shows when
information/data comes
into a program or is
printed out.
What are those funny symbols?
What are those funny symbols?
 PROCESS
 Used to show
calculations, storing of
data in variables, and
other “processes” that
take place within a
program.
What are those funny symbols?
What are those funny symbols?
 DECISION
 Used to show that the
program must decide
whether something
(usually a comparison
between numbers) is
true or false. YES and
NO (or T/F) branches
are usually shown.
What are those funny symbols?
Y
N
X>7?
Another Sample:
Calculating Age
 Pseudocode:
 Start
 Get year DOB
 Calculate age = (sysdate-DOB)
 Print age
 If age > 50 print OLD
 End
Another Sample:
Calculating Age
 Flowchart
 Start
 Get year born
 Calculate age
 Print age
 If age > 50 print OLD
 End
Get yr
Calc age
Print age
Age>50?OLD Y
N
Start
End
Self-Check
 Look at the flowchart section below. If the variable X is
5, what will print (K or 1st)?
X > 5?
YN
Print “1st”Print “K”
Self-Check
 Look at the flowchart section below. If the variable X is
5, what will print (K or 1st)?
X > 5?
YN
Print “1st”Print “K”
K will be printed. The answer to the question “Is X greater than 5?”
is NO, since X is equal to (not greater than) 5.
Self-Check
 Choose the correct
flowchart symbol for each
of these statements.
 AGE>65?
 Calc. Tax
 START
 Print NAME
Self-Check
 Choose the correct
flowchart symbol for each
of these statements.
 AGE>65?
 Calc. Tax
 START
 Print NAME
Challenge
 Try to write pseudocode and create a flowchart for a
program that calculates the average of three grades
and prints the average.
 The word GOOD should be printed only if the average
is more than 80.
Challenge
 Possible pseudocode
 Start
 Get three grades
 Average them (add all of them / number of grads taken)
 Print Average
 Average>80?
 If Yes, print GOOD
 End
Challenge
 Possible flowchart
 Start
 Get three grades
 Average them
 Print Average
 Average>80?
 If Yes, print GOOD
 End
START
END
Get 3 grades
Calc avg
Print avg
Avg>80?GOOD
Y
N
Challenge
 Try to write pseudocode and create a flowchart for a
program that calculates the average of three grades
and prints the average.
 The word GOOD should be printed only if the average
is more than 80.
Challenge
 Possible pseudocode
 Start
 Get three grades
 Average them
 Print Average
 Average>80?
 If Yes, print GOOD
 End
Challenge
 Possible flowchart
 Start
 Get three grades
 Average them
 Print Average
 Average>80?
 If Yes, print GOOD
 End
START
END
Get 3 grades
Calc avg
Print avg
Avg>80?GOOD
Y
N
 Algorithm for Computing Average Miles per
Gallon
 Write a program to do the task: Print a list of the numbers
from 4 to 9, next to each number, print the square of the
number.
pseudocode and Flowchart
pseudocode and Flowchart

More Related Content

What's hot

Algorithm and flowchart
Algorithm and flowchart Algorithm and flowchart
Algorithm and flowchart Shivam Sharma
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithemehsanullah786
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartSachin Goyani
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c languagetanmaymodi4
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++Online
 
Algorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodesAlgorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodesSatveer Mann
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer Ashim Lamichhane
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithmDHANIK VIKRANT
 
Flowcharts and pseudocodes
Flowcharts and pseudocodesFlowcharts and pseudocodes
Flowcharts and pseudocodesDr Piyush Charan
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programmingprogramming9
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 

What's hot (20)

ppt of flowchart
ppt of flowchartppt of flowchart
ppt of flowchart
 
Algorithm and flowchart
Algorithm and flowchart Algorithm and flowchart
Algorithm and flowchart
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
 
algo
algoalgo
algo
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Introduction to problem solving in c++
Introduction to problem solving in c++Introduction to problem solving in c++
Introduction to problem solving in c++
 
Algorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodesAlgorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodes
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Flowcharts and pseudocodes
Flowcharts and pseudocodesFlowcharts and pseudocodes
Flowcharts and pseudocodes
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 

Similar to pseudocode and Flowchart

Programming fundamentals lecture 3
Programming fundamentals lecture 3Programming fundamentals lecture 3
Programming fundamentals lecture 3Raja Hamid
 
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1Ilivecoding.tv
 
Copy of dti2143/dam31303 chap 1 problem solving and program design
Copy of dti2143/dam31303 chap 1 problem solving and program designCopy of dti2143/dam31303 chap 1 problem solving and program design
Copy of dti2143/dam31303 chap 1 problem solving and program designalish sha
 
Spss lecture notes
Spss lecture notesSpss lecture notes
Spss lecture notesDavid mbwiga
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxssuser2f67c91
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxMattFlordeliza1
 
Pengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturUnit Kediaman Luar Kampus
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartsSamuel Igbanogu
 
ALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfmeychu1
 
01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.pptFerdieBalang
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfSusieMaestre1
 

Similar to pseudocode and Flowchart (20)

Programming fundamentals lecture 3
Programming fundamentals lecture 3Programming fundamentals lecture 3
Programming fundamentals lecture 3
 
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
 
programming.ppt
programming.pptprogramming.ppt
programming.ppt
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Algorithms and Flowchart.ppt
Algorithms and Flowchart.pptAlgorithms and Flowchart.ppt
Algorithms and Flowchart.ppt
 
Copy of dti2143/dam31303 chap 1 problem solving and program design
Copy of dti2143/dam31303 chap 1 problem solving and program designCopy of dti2143/dam31303 chap 1 problem solving and program design
Copy of dti2143/dam31303 chap 1 problem solving and program design
 
Programming
ProgrammingProgramming
Programming
 
Chap3
Chap3Chap3
Chap3
 
Spss lecture notes
Spss lecture notesSpss lecture notes
Spss lecture notes
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptx
 
Psuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptxPsuedocode1, algorithm1, Flowchart1.pptx
Psuedocode1, algorithm1, Flowchart1.pptx
 
Introduction To SPSS
Introduction To SPSSIntroduction To SPSS
Introduction To SPSS
 
Pengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstruktur
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Algorithm and psuedocode
Algorithm and psuedocodeAlgorithm and psuedocode
Algorithm and psuedocode
 
ALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdf
 
01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt
 
01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx01 Programming Fundamentals.pptx
01 Programming Fundamentals.pptx
 
Class 8 Lecture Notes
Class 8 Lecture NotesClass 8 Lecture Notes
Class 8 Lecture Notes
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 

More from ALI RAZA

Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm DevelopmentALI RAZA
 
Programming Fundamentals using C++
Programming Fundamentals using C++Programming Fundamentals using C++
Programming Fundamentals using C++ALI RAZA
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to ProgrammingALI RAZA
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to ProgrammingALI RAZA
 
Array sorting
Array sortingArray sorting
Array sortingALI RAZA
 
Array programs
Array programsArray programs
Array programsALI RAZA
 
Quiz game documentary
Quiz game documentaryQuiz game documentary
Quiz game documentaryALI RAZA
 
Function pass by value,function pass by reference
Function pass by value,function pass by reference Function pass by value,function pass by reference
Function pass by value,function pass by reference ALI RAZA
 
Drug Addiction 39 Slides
Drug Addiction 39 SlidesDrug Addiction 39 Slides
Drug Addiction 39 SlidesALI RAZA
 
Drug Addiction Original 51 Slides
Drug Addiction Original 51 SlidesDrug Addiction Original 51 Slides
Drug Addiction Original 51 SlidesALI RAZA
 
Passing stuctures to function
Passing stuctures to functionPassing stuctures to function
Passing stuctures to functionALI RAZA
 
Basic general knowledge
Basic general knowledgeBasic general knowledge
Basic general knowledgeALI RAZA
 
Dil hua kirchi kirchi by mohammad iqbal shams
Dil hua kirchi kirchi by mohammad iqbal shamsDil hua kirchi kirchi by mohammad iqbal shams
Dil hua kirchi kirchi by mohammad iqbal shamsALI RAZA
 
Pathar kar-do-ankh-mein-ansu-complete
Pathar kar-do-ankh-mein-ansu-completePathar kar-do-ankh-mein-ansu-complete
Pathar kar-do-ankh-mein-ansu-completeALI RAZA
 
Husne akhlaq
Husne akhlaqHusne akhlaq
Husne akhlaqALI RAZA
 
Parts of speech sticky note definitions and examples
Parts of speech sticky note definitions and examplesParts of speech sticky note definitions and examples
Parts of speech sticky note definitions and examplesALI RAZA
 

More from ALI RAZA (20)

Structure
StructureStructure
Structure
 
Recursion
RecursionRecursion
Recursion
 
Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm Development
 
Programming Fundamentals using C++
Programming Fundamentals using C++Programming Fundamentals using C++
Programming Fundamentals using C++
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
 
Array sorting
Array sortingArray sorting
Array sorting
 
Array programs
Array programsArray programs
Array programs
 
2D-Array
2D-Array 2D-Array
2D-Array
 
Quiz game documentary
Quiz game documentaryQuiz game documentary
Quiz game documentary
 
Function pass by value,function pass by reference
Function pass by value,function pass by reference Function pass by value,function pass by reference
Function pass by value,function pass by reference
 
Drug Addiction 39 Slides
Drug Addiction 39 SlidesDrug Addiction 39 Slides
Drug Addiction 39 Slides
 
Drug Addiction Original 51 Slides
Drug Addiction Original 51 SlidesDrug Addiction Original 51 Slides
Drug Addiction Original 51 Slides
 
Passing stuctures to function
Passing stuctures to functionPassing stuctures to function
Passing stuctures to function
 
Basic general knowledge
Basic general knowledgeBasic general knowledge
Basic general knowledge
 
Dil hua kirchi kirchi by mohammad iqbal shams
Dil hua kirchi kirchi by mohammad iqbal shamsDil hua kirchi kirchi by mohammad iqbal shams
Dil hua kirchi kirchi by mohammad iqbal shams
 
Pathar kar-do-ankh-mein-ansu-complete
Pathar kar-do-ankh-mein-ansu-completePathar kar-do-ankh-mein-ansu-complete
Pathar kar-do-ankh-mein-ansu-complete
 
Husne akhlaq
Husne akhlaqHusne akhlaq
Husne akhlaq
 
Parts of speech sticky note definitions and examples
Parts of speech sticky note definitions and examplesParts of speech sticky note definitions and examples
Parts of speech sticky note definitions and examples
 
Quik tips
Quik tipsQuik tips
Quik tips
 

Recently uploaded

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Recently uploaded (20)

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

pseudocode and Flowchart

  • 1.
  • 2. What is pseudocode?  List of steps written in English  Like the instructions for a recipe  Must be in the right sequence  Imagine saying “bake the cake” and then “mix it up”
  • 3. Sample Pseudocode  Task: add two numbers  Pseudocode:  Start  Get two numbers  Get first number  Get second number  Add them  Print the answer  End
  • 4. Invitation to Computer Science, Java Version, Third Edition 4 Pseudocode  English language constructs modeled to look like statements available in most programming languages  Steps presented in a structured manner (numbered, indented, and so on)  No fixed syntax for most operations is required
  • 5. Invitation to Computer Science, Java Version, Third Edition 5 Pseudocode (continued)  Less ambiguous and more readable than natural language  Emphasis is on process, not notation  Well-understood forms allow logical reasoning about algorithm behavior  Can be easily translated into a programming language
  • 6. Sample Pseudocode  Task: add two numbers  Pseudocode:  Start  Get two numbers  Get first number  Get second number  Add them  Print the answer  End
  • 7. What does a flowchart look like?  The pseudocode from the previous slide would look like this as a flowchart: Start Get 2 numbers Add them Print answer End
  • 8. What are those funny symbols?  START/END  INPUT/OUTPUT  PROCESS  DECISION
  • 9. What are those funny symbols?  START/END  Used at the beginning and end of each flowchart.
  • 10.  INPUT/OUTPUT  Shows when information/data comes into a program or is printed out. What are those funny symbols?
  • 11. What are those funny symbols?  PROCESS  Used to show calculations, storing of data in variables, and other “processes” that take place within a program. What are those funny symbols?
  • 12. What are those funny symbols?  DECISION  Used to show that the program must decide whether something (usually a comparison between numbers) is true or false. YES and NO (or T/F) branches are usually shown. What are those funny symbols? Y N X>7?
  • 13. Another Sample: Calculating Age  Pseudocode:  Start  Get year DOB  Calculate age = (sysdate-DOB)  Print age  If age > 50 print OLD  End
  • 14. Another Sample: Calculating Age  Flowchart  Start  Get year born  Calculate age  Print age  If age > 50 print OLD  End Get yr Calc age Print age Age>50?OLD Y N Start End
  • 15. Self-Check  Look at the flowchart section below. If the variable X is 5, what will print (K or 1st)? X > 5? YN Print “1st”Print “K”
  • 16. Self-Check  Look at the flowchart section below. If the variable X is 5, what will print (K or 1st)? X > 5? YN Print “1st”Print “K” K will be printed. The answer to the question “Is X greater than 5?” is NO, since X is equal to (not greater than) 5.
  • 17. Self-Check  Choose the correct flowchart symbol for each of these statements.  AGE>65?  Calc. Tax  START  Print NAME
  • 18. Self-Check  Choose the correct flowchart symbol for each of these statements.  AGE>65?  Calc. Tax  START  Print NAME
  • 19. Challenge  Try to write pseudocode and create a flowchart for a program that calculates the average of three grades and prints the average.  The word GOOD should be printed only if the average is more than 80.
  • 20. Challenge  Possible pseudocode  Start  Get three grades  Average them (add all of them / number of grads taken)  Print Average  Average>80?  If Yes, print GOOD  End
  • 21. Challenge  Possible flowchart  Start  Get three grades  Average them  Print Average  Average>80?  If Yes, print GOOD  End START END Get 3 grades Calc avg Print avg Avg>80?GOOD Y N
  • 22. Challenge  Try to write pseudocode and create a flowchart for a program that calculates the average of three grades and prints the average.  The word GOOD should be printed only if the average is more than 80.
  • 23. Challenge  Possible pseudocode  Start  Get three grades  Average them  Print Average  Average>80?  If Yes, print GOOD  End
  • 24. Challenge  Possible flowchart  Start  Get three grades  Average them  Print Average  Average>80?  If Yes, print GOOD  End START END Get 3 grades Calc avg Print avg Avg>80?GOOD Y N
  • 25.
  • 26.  Algorithm for Computing Average Miles per Gallon
  • 27.
  • 28.  Write a program to do the task: Print a list of the numbers from 4 to 9, next to each number, print the square of the number.