SlideShare a Scribd company logo
1 of 15
https://afrizalaje.000webhostapp.com/
Algorithm & Flowchart (Pseudocode)
Muhamad Afrizal
ALGORITHM
a set of instructions or steps to be followed to achieve a certain outcome
The Algorithm will contain:
Input
putting data into an algorithm
01
Output
Displaying data from an algorithm to the user
02
Process
an action performed to some data to make
a change
03
Loop
code that is repeated
05
Variable
a space in the memory of a computer,
that has an identifier, where you can
store data. This data can be changed
04
3 points for successful algorithm
Accuracy
it must lead to the expected outcome (e.g.
create a route from Beijing to Shanghai).
01
Consistency
it must produce the same result each time it
is run.
02
Efficiency
it must solve the problem in the shortest possible time, using as few computer resources as possible. In this
example, the mapping software is replacing a manual method. If it were no faster than looking in an atlas, then it
would not be an improvement on the older method. Later in the unit there is a section on algorithms that are used
to sort and search data. Some of these algorithms are more efficient than others and will sort the data far more
quickly.
03
What will algorithm contains :
A Input, Enter, Process, Variable, and Loop
B Enter, Output, Process, Variable, and Display
C Input, Output, Process, Variable, and Loop
Input, Output, Process, Predict, and Loop
D
a set of symbols put together with commands that are followed to solve a problem
Special symbols in a flowchart
Indicates the start or end of an
algorithm
Indicates a process to be carried out
Indicates a decision to be made
Indicates an input or output
Shows the logical flow of the algorithm
Example of Flowchart
Exercise 2.1
Create an algorithm that will ask a user
to input the length and width of a
rectangle and will then calculate the
area.
Exercise 2.2
 If all three are equal, then the
score is the total of the dice.
 If two are equal the score is equal
to the sum of the two equal dice
minus the third.
 If none are equal, then the score
is zero.
The flowchart beside displays a partly
completed algorithm for a game that
simulates the throwing of three dice to find
the player’s score.
PSEUDOCODE
a language that is used to display an algorithm
Example of Pseudocode
RECEIVE testScore FROM KEYBOARD
IF testScore >= 80 THEN
SEND ‘A’ TO DISPLAY
ELSE
IF testScore >= 70 THEN
SEND ‘B’ TO DISPLAY
ELSE
IF testScore >= 60 THEN
SEND ‘C’ TO DISPLAY
ELSE
IF testScore > 0 THEN
SEND ‘D’ TO DISPLAY
ELSE
SEND ‘FAIL’ TO DISPLAY
END IF
END IF
END IF
END IF
THANK YOU

More Related Content

Similar to explain about computational thinking, and how computer can work

Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
lotlot
 
lesson plan 1 maya 3
lesson plan 1 maya 3lesson plan 1 maya 3
lesson plan 1 maya 3
Max Friel
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
Hattori Sidek
 

Similar to explain about computational thinking, and how computer can work (20)

AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.ppt
 
Algo and flowchart
Algo and flowchartAlgo and flowchart
Algo and flowchart
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
Algorithm Design and Analysis
Algorithm Design and AnalysisAlgorithm Design and Analysis
Algorithm Design and Analysis
 
ALGORITHM.pptx
ALGORITHM.pptxALGORITHM.pptx
ALGORITHM.pptx
 
algorithm and Pseudocode
algorithm and Pseudocodealgorithm and Pseudocode
algorithm and Pseudocode
 
Data structures algorithms basics
Data structures   algorithms basicsData structures   algorithms basics
Data structures algorithms basics
 
A Novel Methodology to Implement Optimization Algorithms in Machine Learning
A Novel Methodology to Implement Optimization Algorithms in Machine LearningA Novel Methodology to Implement Optimization Algorithms in Machine Learning
A Novel Methodology to Implement Optimization Algorithms in Machine Learning
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptx
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
lesson plan 1 maya 3
lesson plan 1 maya 3lesson plan 1 maya 3
lesson plan 1 maya 3
 
Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3Fundamentals of Programming Chapter 3
Fundamentals of Programming Chapter 3
 
Ch1 principles of software development
Ch1 principles of software developmentCh1 principles of software development
Ch1 principles of software development
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
 
Lecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of AlgorithmsLecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of Algorithms
 
Lecture Note-1: Algorithm and Its Properties
Lecture Note-1: Algorithm and Its PropertiesLecture Note-1: Algorithm and Its Properties
Lecture Note-1: Algorithm and Its Properties
 
GE8151 notes pdf.pdf
GE8151 notes pdf.pdfGE8151 notes pdf.pdf
GE8151 notes pdf.pdf
 
Data Structures and Agorithm: DS 22 Analysis of Algorithm.pptx
Data Structures and Agorithm: DS 22 Analysis of Algorithm.pptxData Structures and Agorithm: DS 22 Analysis of Algorithm.pptx
Data Structures and Agorithm: DS 22 Analysis of Algorithm.pptx
 

Recently uploaded

ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
ashishpaul799
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
SaadHumayun7
 

Recently uploaded (20)

Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
Mbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptxMbaye_Astou.Education Civica_Human Rights.pptx
Mbaye_Astou.Education Civica_Human Rights.pptx
 
MichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfMichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdf
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
The Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdfThe Ultimate Guide to Social Media Marketing in 2024.pdf
The Ultimate Guide to Social Media Marketing in 2024.pdf
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
The Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational ResourcesThe Benefits and Challenges of Open Educational Resources
The Benefits and Challenges of Open Educational Resources
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptxREPRODUCTIVE TOXICITY  STUDIE OF MALE AND FEMALEpptx
REPRODUCTIVE TOXICITY STUDIE OF MALE AND FEMALEpptx
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf....................Muslim-Law notes.pdf
....................Muslim-Law notes.pdf
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdfPost Exam Fun(da) Intra UEM General Quiz - Finals.pdf
Post Exam Fun(da) Intra UEM General Quiz - Finals.pdf
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
 
Essential Safety precautions during monsoon season
Essential Safety precautions during monsoon seasonEssential Safety precautions during monsoon season
Essential Safety precautions during monsoon season
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 

explain about computational thinking, and how computer can work

  • 2. ALGORITHM a set of instructions or steps to be followed to achieve a certain outcome
  • 3. The Algorithm will contain: Input putting data into an algorithm 01 Output Displaying data from an algorithm to the user 02 Process an action performed to some data to make a change 03 Loop code that is repeated 05 Variable a space in the memory of a computer, that has an identifier, where you can store data. This data can be changed 04
  • 4. 3 points for successful algorithm Accuracy it must lead to the expected outcome (e.g. create a route from Beijing to Shanghai). 01 Consistency it must produce the same result each time it is run. 02 Efficiency it must solve the problem in the shortest possible time, using as few computer resources as possible. In this example, the mapping software is replacing a manual method. If it were no faster than looking in an atlas, then it would not be an improvement on the older method. Later in the unit there is a section on algorithms that are used to sort and search data. Some of these algorithms are more efficient than others and will sort the data far more quickly. 03
  • 5. What will algorithm contains : A Input, Enter, Process, Variable, and Loop B Enter, Output, Process, Variable, and Display C Input, Output, Process, Variable, and Loop Input, Output, Process, Predict, and Loop D
  • 6.
  • 7.
  • 8. a set of symbols put together with commands that are followed to solve a problem
  • 9. Special symbols in a flowchart Indicates the start or end of an algorithm Indicates a process to be carried out Indicates a decision to be made Indicates an input or output Shows the logical flow of the algorithm
  • 11. Exercise 2.1 Create an algorithm that will ask a user to input the length and width of a rectangle and will then calculate the area.
  • 12. Exercise 2.2  If all three are equal, then the score is the total of the dice.  If two are equal the score is equal to the sum of the two equal dice minus the third.  If none are equal, then the score is zero. The flowchart beside displays a partly completed algorithm for a game that simulates the throwing of three dice to find the player’s score.
  • 13. PSEUDOCODE a language that is used to display an algorithm
  • 14. Example of Pseudocode RECEIVE testScore FROM KEYBOARD IF testScore >= 80 THEN SEND ‘A’ TO DISPLAY ELSE IF testScore >= 70 THEN SEND ‘B’ TO DISPLAY ELSE IF testScore >= 60 THEN SEND ‘C’ TO DISPLAY ELSE IF testScore > 0 THEN SEND ‘D’ TO DISPLAY ELSE SEND ‘FAIL’ TO DISPLAY END IF END IF END IF END IF