Writing Algorithms Flashcards
What is pseudocode
Not an actual programming language, but it should follow a similar structure and read like one. It shows an algorithms steps without worrying about the finer details of any particular programming language.
Do you need to be careful about when writing pseudocode
Making sure it isn’t too vague. Even though the pseudocode isn’t a formal programming language you still need to make sure it’s readable, easy to interpret and not too vague.
How can algorithms be shown?
Using flow diagrams
Play diagrams use different ——— for different commands?
Boxes
What box is the beginning and the end of the algorithm put in?
A box with rounded corners
What box does anything that is put into or taken out of the algorithm put into?
A parallelogram box
General instructions, processes and calculations go into what box?
A rectangular box
Decisions, often a yes or no question, go into what box?
A diamond box
What is a subroutine?
Sub routines Are like sub programs, they reference other flow diagrams
What does an arrow represent in a flow diagram?
Arrows connect boxes and show the direction you should follow. Some boxes might have multiple arrows coming in or going out of them