2.1 algorithms Flashcards
define abstraction
the process of filtering out - essentially ignoring - the characteristics of problems that are not needed in order to concentrate on those that are needed. It is also the filtering out of specific details.
define decomposition
breaking down a complex problem or system into smaller parts that are more manageable and easier to understand. The smaller parts can then be examined and solved, or designed individually, as they are simpler to work with.
define algorithmic/computational thinking
It allows us to take a complex problem, understand what the problem is and develop possible solutions. These solutions can then be presented in a way that a computer, a human, or both, can understand.
two advantages of decomposition are:
smaller problems are easier to understand
they can be examined in more detail
what does this symbol indicate?
terminal - indicates start/end of the flowchart
what does this symbol indicate?
decision - represents different yes or no decisions emerging from different points
what does this symbol indicate?
process - represents a process/action
what does this symbol indicate?
subroutine - used to represent a predefined process
what does this symbol indicate?
flow lines - arrows used to indicate the flow of logic by connecting symbols
define syntax error
This is an error in the spelling or grammar used when coding.
define syntax
The set of rules that specify the correct sequence of symbols used to correctly form a structured program using specific programming language.
define logic error
happen when the code does not perform according to the programmer’s intention. The program may still run without crashing, but the outcome won’t be as expected.
define algorithm
A sequence of logical instructions for carrying out a task. In computing, algorithms are needed to design computer programs.
how are trace tables useful?
because they enable a programmer to compare what the value of each variable should be against what a program actually produces. Where the two differ is the point in the program where a logic error has occurred.