Algorithms
No description yet. This curated deck is ready for daily study.
Card preview (10)
State what is meant by the term ‘algorithm’.
A step-by-step description of how to solve a problem/carry out a task
Give examples of some implementations of algorithms.
• Flowcharts • Pseudocode • Written descriptions • Program code
What are the three main programming constructs used within an algorithm?
• Sequence • Selection • Iteration
What does this symbol represent in a flowchart?
Selection - shows true/false decisions where there are two possible outcomes
What does this symbol represent in a flowchart?
Input / Output - shows when data is input or output by the algorithm
What does this symbol represent in a flowchart?
Subprogram - shows function or procedure that has its own flowchart
What does this symbol represent in a flowchart?
Terminal - shows start and end of an algorithm
What does this symbol represent in a flowchart?
Process - shows data processing (e.g. a calculation)
What is a subprogram?
A self-contained block of code that performs a specific task within a larger program
Give some reasons as to why the use of a subprogram is beneficial.
• Breaks down complex program into smaller parts • Makes program logic clearer • Makes it easier to maintain code • Enables code to be used as many times as needed in program • Enables code used for common tasks to be stored in libraries and used in different programs • Helps efficiency of a team of programmers working on project at same time