Algorithms and Programs Flashcards
(20 cards)
What is an algorithm?
Algorithm is the step-by-step instructions followed to solve a problem.
In what forms, is an algorithm represented?
Flowchart and pseudocode
What is a flowchart?
A method of representing algorithms in pictorial form, depicting the steps and order to be followed to perform a task.
What is pseudocode?
A method of representing an algorithm using simple words and mathematical operators.
What does this symbol represent in flowchart?
rectangle with curves
Start or end
What does this symbol represent in flowchart?
rectangle
Process
What does this symbol represent in flowchart?
kite
Decision box
What is a trace table?
A table that records results from each step in an algorithm and values of variables every time it changes.
In what ways, is the understandability of an algorithm improved?
Using meaningful variable names and separating the complete logic into some modules.
How can you find out the purpose of an algorithm?
By analysing the algorithm step by step and using a trace table.
List an application where searching and sorting an algorithm is used.
Internet search engines.
List an application where route-finding algorithm is used.
Routing in networking.
What is stepwise refinement?
Stepwise refinement, also called top-down design, is the breaking down an outline solution into smaller steps until each step is detailed enough.
What is the difference between local and global variables?
Local variables are accessible within the subroutines only, whereas global variables are accessible throughout the program.
Define structure chart.
A tool to represent the modular structure of a program.
How is selection represented in a structure chart?
Selection in the structure chart is denoted using a diamond symbol.
How is iteration represented in a structure chart?
Iteration in structure chart is denoted using a semi-circular arrow.
What symbol is used to represent variables in a structure chart?
Arrow with a circular end
What symbol is used to represent flag values in a structure chart?
Arrow mark with a solid round end.
What does a double-headed arrow represent in structure charts?
Double-headed arrows represent variables that are updated within a module.