1.9 Algorithms and programs Flashcards
What is an algorithm?
A set of mechanical and sequential steps that are followed in order to take some form of input and process it to form an output
What does parameter passing by value mean?
This is is when the variable (parameter) passed to the subroutine is only copied to it and therefore considered as a local variable. This means that any changes to the variable to the subroutine will not effect the variable in the main program. (It has to be returned)
What does parameter passing by reference mean?
This is when the variable (parameter) passed to the subroutine with it’s address. This means that any changes to the variable in the subroutine will change the variable in the main program as well.
What are the 3 basic programming constructs?
Sequence
Selection
Iteration
What is the sequence programming constructs
Sequence is the order in which instructions occur and are processed.
What is the selection programming construct?
Selection is the execution of a particular set of statements if a condition is satisfied
What is the iteration programming construct?
Iteration is when a particular set of statements are repeated until a condition is satisfied
What are the first stages of software development? (5)
- Problem analysis.
- Requirements, definition and refinement.
- Software specifications and detailed design.
- Software creation and refinement.
- Software validation.
What are the 4 stages of computational thinking?
Decomposition
Pattern Recognition
Abstraction
Algorithm design
What is the decomposition part of computational thinking?
When you break down a problem into smaller sub-problems which can be considered in isolation.
It helps sequence the analysis and encourages a systematic approach
What is the pattern recognition part of computational thinking?
When you identify a pattern in the problem which will help solve it more efficiently. By identifying particular steps that are carried out over and over again it can make the process of solving the program, more manageable.
What is the abstraction part of computational thinking?
This is when you look at the problem and patterns recognised and find out what is important and what can be ignored. Unnecessary details are removed so that a simple model can be formed which will allow for a solution to be easily found