Computational Thinking Flashcards
Decomposition
The process of breaking down a problem into smaller sub-problems
Abstraction
the process of removing unnecessary details and focusing on important ones
Algorithm
A precice method/set of instructions for solving a specific problem
Sequence
the order in which the statements are executed.
Selection
picking a path based on input
Repetition
the part of the code that loops until a certain bit is true
Iteration
a function that repeats a block of code in a specified order, often until a specific result occurs
Count-controlled
A definite loop that repeats a certain amount of time
Condition controlled
A loop that keeps looping until a condition is met
Variable
Holds a value that can change
Constant
A variable that does not change, eg. Pi, VAT, Gravity
One-dimensional data structure
data in a list (provided that the data is of the same data type)
Two-dimensional data structure
A collection of data elements arranged in a grid-like structure with rows and columns
Arithmetic operator
+ - / * **
Relational operators
< >
Logical operators
AND, OR, NOT
Syntax error
Syntax errors are mistakes in the use of the Python language, and are analogous to spelling or grammar mistakes in a language like English
Logic error
They occur when the program runs without crashing, but produces an incorrect result. The error is caused by a mistake in the program’s logic.
Runtime error
A run-time errorhappens when Python understands what you are saying, but runs into trouble when following your instructions.
Overflow error
when the result of a calculation is too large to be represented in the number of bits allocated
Bubble sort
repeatedly gioing through a list, comparing adjacent items and swapping the items if in the wrong order.
Linear search
an algorithm that involves checking each item in a list or sequence of items one at a time in order (hence, linear) to see if it’s the right item.
Binary search
A binary search checks the middle number each time.
Logical reasoning and test data
Robust software
Can handle errors without crashing.
Audit trails
keeping track of who made what changes (and when) during development.