Algorithms - What are they? , how do you write them?

Description

User has deleted their subject information Note on Algorithms - What are they? , how do you write them?, created by Deleted user on 14/11/2016.
Deleted user
Note by Deleted user, updated more than 1 year ago More Less
Oliver Faragher
Created by Oliver Faragher over 7 years ago
Oliver Faragher
Copied by Oliver Faragher over 7 years ago
287
0

Resource summary

Page 1

What are algorithms?Algorithms are representations of how to solve problems. These problems can be in code or in everyday life. For instance you could write an algorithm on how to brush your teeth. In fact you probably, without even knowing it, mentally write hundreds of algorithms every day. How can algorithms be written?Algorithms can be written as both flowcharts and pseudocode. FlowchartsFlowcharts are diagrammatic representations of steps taken to solve a problem. They use various shapes to represent different things.The shapes are:Rhombus = decisionParallelogram = Output or input (information going out or in)Rectangle = Process (somthing being done)Rectangular circle = Start / stopLines with arrows indicate the direction of flow (in which order things are done).This is an example of a flowchart

Page 2

What is pseudocode?Pseudocode is a written representation of an algorithm using various code like terms but remember pseudocode is not actual code. These are the pseudocode terms:OUPUT: showing something on the screen or electronic device - usually requiring an input afterwardsINPUT: something that the user puts into the programSTORE: a process that stores data in the programIF: represents a condition e.g if colour = redTHEN: Showing what to do if the condition is trueELSE: showing what to do if the condition is falseHere is an exampleOUPUT: "How are you?"INPUT: User inputs how they areSTORE: Store users input in answer variable IF: answer = fine THEN OUTPUT: "That's good"ELSE OUPUT: "You need to go to a doctor"

Show full summary Hide full summary

Similar

Essay Writing: My Essay Plan
Andrea Leyden
Hitler and the Nazi Party (1919-23)
Adam Collinge
Kwasi Enin - College Application Essay
philip.ellis
CHEMISTRY C1 4
x_clairey_x
Memory - AQA Psychology Unit 1 GCSE
joshua6729
Prueba de Aptitud Académica - Lenguaje
Teresa Nadal
TOEFL English Vocab (A - M)
Ali Kane
PSBD TEST # 3
yog thapa
Junior Cert Physics formulas
Sarah Egan
2_PSBD HIDDEN QUS By amajad ali
Ps Test
Účto Fífa 1/6
Bára Drahošová