Writing Algorithms - Flow diagrams and Pseudocode Flashcards
What is pseudocode not?
Not an actual programming language but should follow a similar structure and read roughly like one.
Why is pseudocode used?
Shows an algorithm’s steps without worrying about the finer details (syntax) of any particular programming language.
What are advantages of pseudocode?
- quick to write
- easily converted into any programming language
What do the different ways of writing pseudocode do?
They are all equally correct as long as the person reading the code can follow it and understand what you mean.
What do you need to do to pseudocode?
It’s not a formal language but need to make sure it’s readable, easy to interpret and not too vague.
What do the rounded cornered boxes mean in a flowchart?
The beginning and end of the algorithm.
What do the parallelogram boxes mean in a flowchart?
Anything that’s out put into or taken out of the algorithm.
What do the rectangular boxes mean in a flowchart?
General instructions, processes and calculations.
What do the diamond boxes mean in a flowchart?
Decisions, often a “yes” or “no” question.
What are sub routines mean in a flowchart?
They’re like sub programs and reference other flow diagrams.
What do the arrows mean in a flowchart?
Arrows connect boxes and show the direction you should follow. Some boxes might have multiple arrows coming in or going out of them.
What can flow diagrams show or a combination of them?
- sequences
- selections
- iterations