SlideShare una empresa de Scribd logo
USING FLOWCHARTS
AND PSEUDOCODE
STATEMENTS
Algorithm
 A typical programming task can be divided into
two phases:
 Problem solving phase
 Implementation phase
 Algorithm is a written series of logical instructions
which accomplish solution to a problem.
 Pseudo code is an artificial and informal language
that helps to develop algorithms which is similar to
everyday English
Flowchart
 Flowchart shows graphical representation of a
sequence of steps involved in a program
(algorithm)
 The two major types of flowchart:
 System flowchart – depicts the entire data flow from
one program to another throughout a system. It
provides a logical diagram of how the system
operates.
 Program flowchart – depicts the series of operations
that the computer follows to generate the desired
information. It represents in detail, the various steps to
be performed within the system for transforming the
Flowchart Symbols
Name Symbol Use in Flowchart
Terminal Defines the starting and ending point of flowchart
Initialization
The preparation/initialization of memory space for data
processing
Input/Output
The inputting of data for processing, and the printing out
of processed data
Process
Manipulation of data (assignments and mathematical
computations)
Predefined
Process
Manipulation of data (assignments and mathematical
computations) in function/subroutine form
Decision
Process conditions using relational operators. Used for
trapping and filtering data
Flow Lines
Defines the logical sequence of the program. It points to
the next symbol to be performed
On-page
Connector
Connects the flowchart to avoid spaghetti connection on
the same page
Off-page
Connector
Connects the flowchart to avoid spaghetti connection on
different page
Basic Control Structure
 Used to organize the flow of control in an
algorithm
 Also called single entry/single exit structure,
there are three basic structure:
 Sequence – the process is execute from one to
another in a straight forward manner
Entry Exit
Basic Control Structure
 Selection – a choice is provided between two
alternatives
 The condition to be tested
 Process/statement to be performed if the condition is
satisfied
 Process/statement to be performed if the condition is
satisfied
True
False
Exit
Entry
Basic Control Structure
 Iteration/Repetitive or loop control – provides a
means of repeating part of an instruction without
rewriting that part of an instruction
 Body of the loop
 Loop-exit condition
Entry
Exit
Example No. 1
 Pseudo code:
1. Print “Enter your name”
2. Input a name
3. Print “Hello” and the name inputted
 Algorithm:
1. Print “Enter your name”
2. Input Name
3. Print “Hello”, Name
Example No. 1
Flowchart:
Start
Name
Print (“Enter
your name”)
Input Name
Print (“Hello”),
Name
Stop
Sample Output:
Enter your name
Shein
Hello Shein
Example No. 2
 Pseudo code:
1. Print “The program will add 2 numbers:”
2. Print “Input the first number:”
3. Input the first number
4. Print “Input the second number:”
5. Input the second number
6. Calculate the sum of the two numbers
7. Print “The sum is”, and the sum of the two
numbers
Example No. 2
 Algorithm:
1. Print “The program will add 2 numbers:”
2. Print “Input the first number:”
3. Input fst
4. Print “Input the second number:”
5. Input sec
6. Sum = fst + sec
7. Print “The sum is”, Sum
Example No. 2
Flowchart:
Start
fst, sec, Sum
Print (“The program will
add 2 numbers:”)
Print “Input the first
number:”
Input fst
1
1
Print (“Input the second
number:”)
Input sec
Print (“The sum
is”, Sum)
Sum = fst + sec
Stop
How many
hours did
you work?
START
Print(“How
many hours did
you work?”)
Input Hours
Print(“How
much do you
get paid per
hour?”)
Input PayRate
Print (“Gross
Pay”,
GrossPay)
END
Variable Contents:
Hours: ?
Pay Rate: ?
Gross Pay: ?
Output
Operation
Stepping through the
Flowchart
GrossPay=Hours
* PayRate
How many
hours did
you work?
40
START
Print(“How
many hours did
you work?”)
Input Hours
Print(“How
much do you
get paid per
hour?”)
Input PayRate
Print (“Gross
Pay”,
GrossPay)
END
Variable Contents:
Hours: 40
Pay Rate: ?
Gross Pay: ?
Input
Operation
(User types
40)
GrossPay=Hours
* PayRate
Stepping through the
Flowchart
How much
do you get
paid per
hour?
START
Print(“How
many hours did
you work?”)
Input Hours
Print(“How
much do you
get paid per
hour?”)
Input PayRate
Print (“Gross
Pay”,
GrossPay)
END
Variable Contents:
Hours: 40
Pay Rate: ?
Gross Pay: ?
Output
Operation
GrossPay=Hours
* PayRate
Stepping through the
Flowchart
How much
do you get
paid per
hour? 20
START
Print(“How
many hours did
you work?”)
Input Hours
Print(“How
much do you
get paid per
hour?”)
Input PayRate
Print (“Gross
Pay”,
GrossPay)
END
Variable Contents:
Hours: 40
Pay Rate: 20
Gross Pay: ?
Input
Operation
(User types
20)
GrossPay=Hours
* PayRate
Stepping through the
Flowchart
How much
do you get
paid per
hour? 20
START
Print(“How
many hours did
you work?”)
Input Hours
Print(“How
much do you
get paid per
hour?”)
Input PayRate
GrossPay=Hours
* PayRate
Print (“Gross
Pay”,
GrossPay)
END
Variable Contents:
Hours: 40
PayRate: 20
GrossPay: 800
Process: The
product of 40
times 20 is
stored in
Gross Pay
Stepping through the
Flowchart
START
Print(“How
many hours did
you work?”)
Input Hours
Print(“How
much do you
get paid per
hour?”)
Input PayRate
Print (“Gross
Pay”,
GrossPay)
END
Variable Contents:
Hours: 40
Pay Rate: 20
Gross Pay: 800
Output
Operation
Gross pay is
800
GrossPay=Hours
* PayRate
Stepping through the
Flowchart
Example No.3
1. Create a flowchart that
computes the product and
the quotient of two numbers.
Start
n1,n2,
prod,quo
Print (“ Enter
two numbers”)
prod=n1* n2
quo=n1/ n2
1
1
Print (“ The Product of
two numbers :”, prod)
Print (“ The Quotient of two
numbers :”, quo)
Stop
Example No.3
Input n1, n2
Seatwork:
1. Create a flowchart that will
convert inches to centimeter.
Wherein, 1 inch = 2.54cm.
Start
inch, cen
Print (“ Enter
Inch(es)”)
cen=inch* 2.54
Print (“ Converted Inche(s)”, cen)
Stop
Input inch
Additional exercises:
Add 10 and 20
Algorithm (in simple English)
 Initialize sum = 0 (PROCESS)
 Enter the numbers (I/O)
 Add them and store the result in sum
(PROCESS)
 Print sum (I/O)
 Flowchart
Find the sum of 5 numbers
Algorithm (in simple English)
1. Initialize sum = 0 and count =
0 (PROCESS)
2. Enter n (I/O)
3. Find sum + n and assign it to sum and then
increment count by 1 (PROCESS)
4. Is count < 5 (DECISION)
5. if YES go to step 2
else
Print sum (I/O)
Print Hello World 10 times
Algorithm (in simple English
1. Initialize count = 0 (PROCESS)
2. Print Hello World (I/O)
3. Increment count by 1 (PROCESS)
4. Is count < 10 (DECISION)
5. if YES go to step 2
else Stop
Draw a flowchart to log in to facebook
account
Algorithm (in simple English)
1. Enter www.facebook.com in your
browser. (I/O)
2. facebook Home page loads (PROCESS)
3. Enter your Email ID and Password (I/O)
4. Is Email ID and Password Valid (DECISION)
if NO then
Log in error (PROCESS)
go to step 3
else
Find the sum of the numbers in each set.
You are given hundred numbers divided in ten
sets in the following order.
Set 1: 1-10
Set 2: 11-20
Set 3: 21-30
…
Set 10: 91-100
Algorithm in simple English
Initialize count = 1 and i = 1 (PROCESS)
Check if i is less than or equal to 10 (DECISION)
if YES then perform step 3
else STOP
Set sum = 0 and j = 1 (PROCESS)
Check if j is less than or equal to 10 (DECISION)
if YES then perform step 5
else perform step 9
Add count to sum
sum = sum + count (PROCESS)
Increment count by 1
count = count + 1 (PROCESS)
Increment j by 1
j = j + 1 (PROCESS)
Go to Step 4
Print sum (I/O)
Increment i by 1
i = i + 1 (PROCESS)
Go to Step 2
Psuedocode1, algorithm1, Flowchart1.pptx

Más contenido relacionado

Similar a Psuedocode1, algorithm1, Flowchart1.pptx

algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
AmanPratik11
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Sachin Goyani
 
Ch5(loops)
Ch5(loops)Ch5(loops)
Ch5(loops)
Uğurcan Uzer
 
Foundations of Programming Part I
Foundations of Programming Part IFoundations of Programming Part I
Foundations of Programming Part I
VNIT-ACM Student Chapter
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
Deva Singh
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
Muhammadalizardari
 
Algorithms and Flowchart.ppt
Algorithms and Flowchart.pptAlgorithms and Flowchart.ppt
Algorithms and Flowchart.ppt
MsKGowriDhilipkumar
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
Rohit Shrivastava
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
Anonymous9etQKwW
 
ALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdf
meychu1
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_i
Elsayed Hemayed
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
MIT,Imphal
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
Trivuz ত্রিভুজ
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
ShaswatSurya
 
Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)
ExcellenceAcadmy
 
Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)
ExcellenceAcadmy
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
Huu Bang Le Phan
 
Pengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstruktur
Unit Kediaman Luar Kampus
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Basic computer-programming-2
Basic computer-programming-2Basic computer-programming-2
Basic computer-programming-2
lemonmichelangelo
 

Similar a Psuedocode1, algorithm1, Flowchart1.pptx (20)

algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Ch5(loops)
Ch5(loops)Ch5(loops)
Ch5(loops)
 
Foundations of Programming Part I
Foundations of Programming Part IFoundations of Programming Part I
Foundations of Programming Part I
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
 
Algorithms and Flowchart.ppt
Algorithms and Flowchart.pptAlgorithms and Flowchart.ppt
Algorithms and Flowchart.ppt
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 
ALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdf
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_i
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)
 
Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
 
Pengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstrukturPengenalan kepada pengaturcaraan berstruktur
Pengenalan kepada pengaturcaraan berstruktur
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Basic computer-programming-2
Basic computer-programming-2Basic computer-programming-2
Basic computer-programming-2
 

Más de MattFlordeliza1

web host used tsu lecture reliable for other .pptx
web host used tsu lecture reliable for other .pptxweb host used tsu lecture reliable for other .pptx
web host used tsu lecture reliable for other .pptx
MattFlordeliza1
 
bootstrap 4 used for discussion in chcci.pptx
bootstrap 4 used for discussion in chcci.pptxbootstrap 4 used for discussion in chcci.pptx
bootstrap 4 used for discussion in chcci.pptx
MattFlordeliza1
 
JDBC OVERVIEW uses from the subject of EDP.pptx
JDBC OVERVIEW uses from the subject of EDP.pptxJDBC OVERVIEW uses from the subject of EDP.pptx
JDBC OVERVIEW uses from the subject of EDP.pptx
MattFlordeliza1
 
ACtionlistener in java use in discussion.pptx
ACtionlistener in java use in discussion.pptxACtionlistener in java use in discussion.pptx
ACtionlistener in java use in discussion.pptx
MattFlordeliza1
 
PLF-Lesson tsu lecture time 2 units-2.pptx
PLF-Lesson tsu lecture time 2 units-2.pptxPLF-Lesson tsu lecture time 2 units-2.pptx
PLF-Lesson tsu lecture time 2 units-2.pptx
MattFlordeliza1
 
PLF-Lesson-5 programming in TSU lec.pptx
PLF-Lesson-5 programming in TSU lec.pptxPLF-Lesson-5 programming in TSU lec.pptx
PLF-Lesson-5 programming in TSU lec.pptx
MattFlordeliza1
 
www module 1.pptx
www module 1.pptxwww module 1.pptx
www module 1.pptx
MattFlordeliza1
 
QUEUE.pptx
QUEUE.pptxQUEUE.pptx
QUEUE.pptx
MattFlordeliza1
 

Más de MattFlordeliza1 (8)

web host used tsu lecture reliable for other .pptx
web host used tsu lecture reliable for other .pptxweb host used tsu lecture reliable for other .pptx
web host used tsu lecture reliable for other .pptx
 
bootstrap 4 used for discussion in chcci.pptx
bootstrap 4 used for discussion in chcci.pptxbootstrap 4 used for discussion in chcci.pptx
bootstrap 4 used for discussion in chcci.pptx
 
JDBC OVERVIEW uses from the subject of EDP.pptx
JDBC OVERVIEW uses from the subject of EDP.pptxJDBC OVERVIEW uses from the subject of EDP.pptx
JDBC OVERVIEW uses from the subject of EDP.pptx
 
ACtionlistener in java use in discussion.pptx
ACtionlistener in java use in discussion.pptxACtionlistener in java use in discussion.pptx
ACtionlistener in java use in discussion.pptx
 
PLF-Lesson tsu lecture time 2 units-2.pptx
PLF-Lesson tsu lecture time 2 units-2.pptxPLF-Lesson tsu lecture time 2 units-2.pptx
PLF-Lesson tsu lecture time 2 units-2.pptx
 
PLF-Lesson-5 programming in TSU lec.pptx
PLF-Lesson-5 programming in TSU lec.pptxPLF-Lesson-5 programming in TSU lec.pptx
PLF-Lesson-5 programming in TSU lec.pptx
 
www module 1.pptx
www module 1.pptxwww module 1.pptx
www module 1.pptx
 
QUEUE.pptx
QUEUE.pptxQUEUE.pptx
QUEUE.pptx
 

Último

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 

Último (20)

5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 

Psuedocode1, algorithm1, Flowchart1.pptx

  • 2. Algorithm  A typical programming task can be divided into two phases:  Problem solving phase  Implementation phase  Algorithm is a written series of logical instructions which accomplish solution to a problem.  Pseudo code is an artificial and informal language that helps to develop algorithms which is similar to everyday English
  • 3. Flowchart  Flowchart shows graphical representation of a sequence of steps involved in a program (algorithm)  The two major types of flowchart:  System flowchart – depicts the entire data flow from one program to another throughout a system. It provides a logical diagram of how the system operates.  Program flowchart – depicts the series of operations that the computer follows to generate the desired information. It represents in detail, the various steps to be performed within the system for transforming the
  • 4. Flowchart Symbols Name Symbol Use in Flowchart Terminal Defines the starting and ending point of flowchart Initialization The preparation/initialization of memory space for data processing Input/Output The inputting of data for processing, and the printing out of processed data Process Manipulation of data (assignments and mathematical computations) Predefined Process Manipulation of data (assignments and mathematical computations) in function/subroutine form Decision Process conditions using relational operators. Used for trapping and filtering data Flow Lines Defines the logical sequence of the program. It points to the next symbol to be performed On-page Connector Connects the flowchart to avoid spaghetti connection on the same page Off-page Connector Connects the flowchart to avoid spaghetti connection on different page
  • 5. Basic Control Structure  Used to organize the flow of control in an algorithm  Also called single entry/single exit structure, there are three basic structure:  Sequence – the process is execute from one to another in a straight forward manner Entry Exit
  • 6. Basic Control Structure  Selection – a choice is provided between two alternatives  The condition to be tested  Process/statement to be performed if the condition is satisfied  Process/statement to be performed if the condition is satisfied True False Exit Entry
  • 7. Basic Control Structure  Iteration/Repetitive or loop control – provides a means of repeating part of an instruction without rewriting that part of an instruction  Body of the loop  Loop-exit condition Entry Exit
  • 8. Example No. 1  Pseudo code: 1. Print “Enter your name” 2. Input a name 3. Print “Hello” and the name inputted  Algorithm: 1. Print “Enter your name” 2. Input Name 3. Print “Hello”, Name
  • 9. Example No. 1 Flowchart: Start Name Print (“Enter your name”) Input Name Print (“Hello”), Name Stop Sample Output: Enter your name Shein Hello Shein
  • 10. Example No. 2  Pseudo code: 1. Print “The program will add 2 numbers:” 2. Print “Input the first number:” 3. Input the first number 4. Print “Input the second number:” 5. Input the second number 6. Calculate the sum of the two numbers 7. Print “The sum is”, and the sum of the two numbers
  • 11. Example No. 2  Algorithm: 1. Print “The program will add 2 numbers:” 2. Print “Input the first number:” 3. Input fst 4. Print “Input the second number:” 5. Input sec 6. Sum = fst + sec 7. Print “The sum is”, Sum
  • 12. Example No. 2 Flowchart: Start fst, sec, Sum Print (“The program will add 2 numbers:”) Print “Input the first number:” Input fst 1 1 Print (“Input the second number:”) Input sec Print (“The sum is”, Sum) Sum = fst + sec Stop
  • 13. How many hours did you work? START Print(“How many hours did you work?”) Input Hours Print(“How much do you get paid per hour?”) Input PayRate Print (“Gross Pay”, GrossPay) END Variable Contents: Hours: ? Pay Rate: ? Gross Pay: ? Output Operation Stepping through the Flowchart GrossPay=Hours * PayRate
  • 14. How many hours did you work? 40 START Print(“How many hours did you work?”) Input Hours Print(“How much do you get paid per hour?”) Input PayRate Print (“Gross Pay”, GrossPay) END Variable Contents: Hours: 40 Pay Rate: ? Gross Pay: ? Input Operation (User types 40) GrossPay=Hours * PayRate Stepping through the Flowchart
  • 15. How much do you get paid per hour? START Print(“How many hours did you work?”) Input Hours Print(“How much do you get paid per hour?”) Input PayRate Print (“Gross Pay”, GrossPay) END Variable Contents: Hours: 40 Pay Rate: ? Gross Pay: ? Output Operation GrossPay=Hours * PayRate Stepping through the Flowchart
  • 16. How much do you get paid per hour? 20 START Print(“How many hours did you work?”) Input Hours Print(“How much do you get paid per hour?”) Input PayRate Print (“Gross Pay”, GrossPay) END Variable Contents: Hours: 40 Pay Rate: 20 Gross Pay: ? Input Operation (User types 20) GrossPay=Hours * PayRate Stepping through the Flowchart
  • 17. How much do you get paid per hour? 20 START Print(“How many hours did you work?”) Input Hours Print(“How much do you get paid per hour?”) Input PayRate GrossPay=Hours * PayRate Print (“Gross Pay”, GrossPay) END Variable Contents: Hours: 40 PayRate: 20 GrossPay: 800 Process: The product of 40 times 20 is stored in Gross Pay Stepping through the Flowchart
  • 18. START Print(“How many hours did you work?”) Input Hours Print(“How much do you get paid per hour?”) Input PayRate Print (“Gross Pay”, GrossPay) END Variable Contents: Hours: 40 Pay Rate: 20 Gross Pay: 800 Output Operation Gross pay is 800 GrossPay=Hours * PayRate Stepping through the Flowchart
  • 19. Example No.3 1. Create a flowchart that computes the product and the quotient of two numbers.
  • 20. Start n1,n2, prod,quo Print (“ Enter two numbers”) prod=n1* n2 quo=n1/ n2 1 1 Print (“ The Product of two numbers :”, prod) Print (“ The Quotient of two numbers :”, quo) Stop Example No.3 Input n1, n2
  • 21. Seatwork: 1. Create a flowchart that will convert inches to centimeter. Wherein, 1 inch = 2.54cm.
  • 22. Start inch, cen Print (“ Enter Inch(es)”) cen=inch* 2.54 Print (“ Converted Inche(s)”, cen) Stop Input inch
  • 23. Additional exercises: Add 10 and 20 Algorithm (in simple English)  Initialize sum = 0 (PROCESS)  Enter the numbers (I/O)  Add them and store the result in sum (PROCESS)  Print sum (I/O)  Flowchart
  • 24.
  • 25. Find the sum of 5 numbers Algorithm (in simple English) 1. Initialize sum = 0 and count = 0 (PROCESS) 2. Enter n (I/O) 3. Find sum + n and assign it to sum and then increment count by 1 (PROCESS) 4. Is count < 5 (DECISION) 5. if YES go to step 2 else Print sum (I/O)
  • 26.
  • 27. Print Hello World 10 times Algorithm (in simple English 1. Initialize count = 0 (PROCESS) 2. Print Hello World (I/O) 3. Increment count by 1 (PROCESS) 4. Is count < 10 (DECISION) 5. if YES go to step 2 else Stop
  • 28.
  • 29. Draw a flowchart to log in to facebook account Algorithm (in simple English) 1. Enter www.facebook.com in your browser. (I/O) 2. facebook Home page loads (PROCESS) 3. Enter your Email ID and Password (I/O) 4. Is Email ID and Password Valid (DECISION) if NO then Log in error (PROCESS) go to step 3 else
  • 30.
  • 31. Find the sum of the numbers in each set. You are given hundred numbers divided in ten sets in the following order. Set 1: 1-10 Set 2: 11-20 Set 3: 21-30 … Set 10: 91-100
  • 32. Algorithm in simple English Initialize count = 1 and i = 1 (PROCESS) Check if i is less than or equal to 10 (DECISION) if YES then perform step 3 else STOP Set sum = 0 and j = 1 (PROCESS) Check if j is less than or equal to 10 (DECISION) if YES then perform step 5 else perform step 9 Add count to sum sum = sum + count (PROCESS) Increment count by 1 count = count + 1 (PROCESS) Increment j by 1 j = j + 1 (PROCESS) Go to Step 4 Print sum (I/O) Increment i by 1 i = i + 1 (PROCESS) Go to Step 2

Notas del editor

  1. Problem Solving: Analysis and Specification Understand (define) the problem and what the solution must do Algorithm Development Develop a comprehensive unambiguous logical sequence of steps to solve the problem Verification of Algorithm Follow steps closely (manually) to see if solution works Implementation Phase: Program Development Translate algorithm into a program written in a programming language Program Testing Test program for syntactical and logical errors. Fix the errors. Algorithm vs. Pseudocodes Algorithm is basically a step by step procedure to solve a particular problem . Pseudocode is the informal representation of the code, doesn't follow rules of the language